Pearcleaner icon indicating copy to clipboard operation
Pearcleaner copied to clipboard

[FR] Are there any plans to add multi-language function?

Open wendaleruan opened this issue 2 years ago • 40 comments

Are there any plans to add multi-language function?

wendaleruan avatar Jul 24 '24 14:07 wendaleruan

Likely in the near future once I have the app running really stable and some of the new features I'm working on added in. Will probably need some external help on this though to contextualize all the strings to different languages.

alienator88 avatar Jul 29 '24 15:07 alienator88

I can help you translate it into Chinese. Let me know when you need it and send me the Xliff files. 😊

megabitsenmzq avatar Aug 02 '24 01:08 megabitsenmzq

That would be super helpful @megabitsenmzq! I'll tag you here when it's ready.

alienator88 avatar Aug 03 '24 04:08 alienator88

Count with me also when you will be ready to translate Pearcleaner to other languages.

Svec-Tomas avatar Oct 15 '24 16:10 Svec-Tomas

I'm in the process of getting the current base language setup in a Strings catalog, about 80% done right now. As soon as I'm finished with it, we can start doing pull requests for additional languages :)

alienator88 avatar Oct 15 '24 17:10 alienator88

I added the base translation now, it uses the newer XCode 15+ Strings catalog. Best way to do this is fork the repo, open the project in XCode and add your language and translations to the Resources > Localizable.xcstrings catalog file. Ignore strings marked with "Don't Translate", although it should prevent you from editing those anyways. Then create a pull request and I'll approve the changes.

Screenshot 2024-10-15 at 2 40 54 PM

alienator88 avatar Oct 15 '24 20:10 alienator88

I haven't downloaded Xcode and I've never used it for translation. It seems like an unnecessarily complicated application for someone who doesn't develop apps, especially since it requires around 4GB of space.

I'm using an app called Strings - Translate & Localize, which is perfect for this purpose. It's free for manual translation (AI has a limit of 20 free translations).

Can I ask you to add SK (Slovak) as a language to Localizable.xcstrings, so I can choose it for translation in the app?

Thank you in advance!

Svec-Tomas avatar Oct 15 '24 21:10 Svec-Tomas

Just pushed an update to the file, I had to make an edit on one of the keys to make it show up. I tried the app you mentioned above and it doesn't seem to account for the "Don't Translate" state that XCode shows, so I'm putting a screenshot here of what doesn't need to be translated: image

Thank you!

For anyone else wanting to contribute, let me know what language you would like added to the file.

alienator88 avatar Oct 15 '24 22:10 alienator88

I usually export XCLOC files and give them to my user. And let them use something like "Loca Studio" to input the strings. I'll then import the file back to Xcode to review it. Xcode can also edit XCLOC files directly if the user has Xcode installed.

megabitsenmzq avatar Oct 16 '24 06:10 megabitsenmzq

That's nice, I didn't see the export/import function before. This is my first time doing localization on a mac app. I can export Chinese XCLOC file for you, which version, Traditional, Simplified, etc.?

alienator88 avatar Oct 16 '24 16:10 alienator88

That's nice, I didn't see the export/import function before. This is my first time doing localization on a mac app. I can export Chinese XCLOC file for you, which version, Traditional, Simplified, etc.?

I can do both zh_Hans and zh_Hant. But I can also create a pull request for that later, so you don't need to export them for me.

megabitsenmzq avatar Oct 17 '24 05:10 megabitsenmzq

Awesome, thank you!

alienator88 avatar Oct 17 '24 05:10 alienator88

I found that many "Don't Translate"s are unnecessary. Adding "verbatim" to the Text can exclude these Texts from translation. Also, replacing"" with EmptyViews can eliminate all of them. I will first create a PR for this.

image

megabitsenmzq avatar Oct 18 '24 06:10 megabitsenmzq

@megabitsenmzq tested and merged ✅ Thank you, I wasn't aware of the "verbatim" property before today.

alienator88 avatar Oct 18 '24 16:10 alienator88

Hi :) I could translate the app into German.

florentinf avatar Oct 20 '24 10:10 florentinf

@florentinf go for it! Any help is appreciated :)

alienator88 avatar Oct 20 '24 19:10 alienator88

@alienator88 In German, "duzen" means to address someone informally using "du," while "siezen" refers to the formal address using "Sie." The choice depends on the relationship and context. Should I use "du" or "Sie" in the German translation?

florentinf avatar Oct 20 '24 20:10 florentinf

For which text in the code? So I know the context.

alienator88 avatar Oct 20 '24 20:10 alienator88

@alienator88 For example here: Add files or folders that will be ignored when searching for orphaned files. Click a path to remove it from the list. Now the question is whether you should use the “Du” form or the “Sie” form in German

florentinf avatar Oct 20 '24 20:10 florentinf

@alienator88 Also, should I translate sentences literally, or is it better to adapt them stylistically for the best flow?

florentinf avatar Oct 20 '24 20:10 florentinf