Softcatala / translation-memory-tools

A set of tools to build, maintain and use translation memories
https://www.softcatala.org/recursos/memories/
29 stars 17 forks source link

Tractar tots els fitxers `*.strings`, no només `Localizable.strings` #281

Open pereorga opened 1 year ago

pereorga commented 1 year ago

Localizable.strings és el fitxer per defecte, però alguns projectes tenen diversos fitxers .strings amb altres noms (en general, com més gran és el projecte, més tendeix a que tingui les cadenes distribuïdes en diversos fitxers).

Per exemple, al Cyberduck:

$ git clone --depth=1 https://github.com/iterate-ch/cyberduck $ ls cyberduck/i18n/src/main/resources/ca.lproj/*.strings Alert.strings Crash.strings File.strings Login.strings ServicesMenu.strings Archive.strings Credentials.strings Folder.strings Main.strings Sftp.strings Azure.strings Cryptomator.strings Goto.strings Mosso.strings Status.strings Bookmark.strings Donate.strings Info.strings Preferences.strings Support.strings Browser.strings Download.strings InfoPlist.strings Profiles.strings Transfer.strings Command.strings Duplicate.strings Keychain.strings Prompt.strings Configuration.strings EUE.strings License.strings S3.strings Connection.strings Error.strings Localizable.strings SDS.strings

I no són fitxers més petits:

$ prop2po -t en.lproj/Localizable.strings -i ca.lproj/Localizable.strings | wc -l processing 1 files... [###########################################] 100% 664 $ prop2po -t en.lproj/Main.strings -i ca.lproj/Main.strings | wc -l processing 1 files... [###########################################] 100% 692

Entenc que es podria agafar qualsevol fitxer acabat amb .strings, si existeix tant al directori anglès com al català.