
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
LocoTool is a command-line tool for localization tasks, designed to simplify the management and validation of localization strings in iOS and Android projects.
LocoTool can be installed via RubyGems. Make sure you have Ruby installed on your system, then run the following command:
$ gem install loco_tool
LocoTool provides various commands to perform localization tasks. Here are some examples:
$ locotool duplicates [FILE_A] [FILE_B]
This command compares two localization files and identifies duplicate keys between them.
$ locotool sync [PATH_A] [PATH_B] [BASE_LANG] [TARGET_LANG]
This command synchronizes localization files between two directories (PATH_A
and PATH_B
). It compares the base language (BASE_LANG
) with the target language (TARGET_LANG
) and moves missing strings from the base file to the target file.
$ locotool sync_ios_auto [PATH_A] [PATH_B] [BASE_LANG]
This command automatically finds and syncs iOS localization files in the specified directories (PATH_A
and PATH_B
). It iterates over the available target languages, excluding the base language (BASE_LANG
), and performs the synchronization operation.
$ locotool export [PATH_A] [PATH_B] -s [SORT] -c [CASE]
This command transforms localization files from PATH_A
to PATH_B
. It can sort the keys in the output files (SORT
) and change the case of the keys (CASE
). The SORT
parameter can be set to asc
, or desc
. The CASE
parameter can be set to lower
, or upper
. Both parameters are optional.
$ locotool oversize [PATH_A] [TARGET_LANG] [GAP]
This command identifies oversized strings in the localization files in the specified directory (PATH_A
). It compares the length of the strings in the target language (TARGET_LANG
) with the base language and reports the strings that exceed the specified gap (GAP
).
Export Localization file from iOS to Android
$ locotool export en.lproj/Localizable.strings en.xml -s asc -c lower
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request on the LocoTool GitHub repository.
This project is licensed under the MIT License.
FAQs
Unknown package
We found that loco_tool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.