Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌐 Localization: Overhaul Localizable Content + Normalize Specific Expressions in Settings + Refined Chinese Localization #303

Merged
merged 10 commits into from
Mar 31, 2024

Conversation

KrLite
Copy link
Contributor

@KrLite KrLite commented Mar 31, 2024

Hi there!

I'm really fascinated by the app you made, hence I want to contribute to make it more accessible and user friendly by adding localizations and fixing some inappropriate content expressions.

I hereby explain what I actually did in the pull request:

1. Normalize Expressions

  • Change all MacOS in texts to macOS since the latter is the official name.
  • Change all Github in texts to GitHub since the latter is the official name.
  • Apply capitalized title style to all button and menu texts according to Apple's Human Interface Guidelines (Menus > Labels).
  • Apply descriptive text style (only capitalize the first words) to all descriptive texts such as configuration names, etc.

2. Expand Localization Reach

  • Migrate almost every hardcoded String to LocalizedStringResource to enable localizations.
  • Prevent ternary operators from breaking the localizations of Text, by separating them into independent expressions or injecting LocalizedStringResource.
  • Add essential modifications to code structure in order to use fully localized text resources.
  • Migrate all hardcoded app name (Loop) to dynamic formats like \(Bundle.main.appName).

3. Chinese Localization

  • Adding a practical language is a good practice to test if all the localizations are working to expectations. The translations are carefully chosen by me and some friends, ensuring no inconsistency, bug, misunderstanding and turgid appears.
Screenshots with Chinese Localizations

Conclusion

I'm always passionate to contribute to amazing open source projects. I hope my pull request helps simplify future localization workflows and convenience users in more regions. I would greatly appreciate if this request could be merged!

Please contact me if there are any issues.

@meismc
Copy link

meismc commented Mar 31, 2024

handsome

@meismc
Copy link

meismc commented Mar 31, 2024

🫡👍

Copy link
Owner

@MrKai77 MrKai77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much! It clearly looks like you've put a lot of work into this 🤩
I have requested a few changes, but then this should be ready for merge!

In addition, I don't speak Chinese at all but, I have noticed that you put some periods (。) in certain options, while others do not. Most notably:
image
image

Just making sure that these were intentional?
Thank you very much for your contributions :D

Loop/Settings/MoreSettingsView.swift Outdated Show resolved Hide resolved
Loop/Settings/MoreSettingsView.swift Outdated Show resolved Hide resolved
Loop/Settings/GeneralSettingsView.swift Outdated Show resolved Hide resolved
Loop/Settings/GeneralSettingsView.swift Outdated Show resolved Hide resolved
Loop/Settings/ExcludeListSettingsView.swift Outdated Show resolved Hide resolved
Loop/Window Management/WindowDirection.swift Outdated Show resolved Hide resolved
Loop/Window Management/WindowDirection.swift Outdated Show resolved Hide resolved
Loop/Window Management/WindowDirection.swift Outdated Show resolved Hide resolved
Loop/Window Management/WindowDirection.swift Outdated Show resolved Hide resolved
Loop/Window Management/Window.swift Outdated Show resolved Hide resolved
@MrKai77 MrKai77 changed the title [Localization] Overhaul Localizable Content + Normalize Specific Expressions in Settings + Refined Chinese Localization 🌐 Localization: Overhaul Localizable Content + Normalize Specific Expressions in Settings + Refined Chinese Localization Mar 31, 2024
@MrKai77 MrKai77 mentioned this pull request Mar 31, 2024
This was linked to issues Mar 31, 2024
@MrKai77 MrKai77 mentioned this pull request Mar 31, 2024
2 tasks
Copy link
Contributor Author

@KrLite KrLite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@KrLite KrLite requested a review from MrKai77 March 31, 2024 08:09
@MrKai77
Copy link
Owner

MrKai77 commented Mar 31, 2024

One more minor change, looks like "App Icon" hasn't been localized.
image

@KrLite
Copy link
Contributor Author

KrLite commented Mar 31, 2024

One more minor change, looks like "App Icon" hasn't been localized. image

😱 Fixed now.

Copy link
Owner

@MrKai77 MrKai77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you so much again! I really appreciate it! 🥳

@MrKai77 MrKai77 merged commit 3e2a08b into MrKai77:develop Mar 31, 2024
@MrKai77 MrKai77 mentioned this pull request Apr 1, 2024
2 tasks
@MrKai77 MrKai77 mentioned this pull request Apr 8, 2024
2 tasks
@zXiaoyuLuo
Copy link

but why could not change the language😭it is the lastest version.
image
Uploading image.png…

@MrKai77
Copy link
Owner

MrKai77 commented Apr 16, 2024

@zXiaoyuLuo It has not yet been released as a version. It is something I hope to do soon, but I have been busy fixing bugs and adding new features at the moment 😉

@zXiaoyuLuo
Copy link

whether it means that i should delete it and re-download it on my macbook?
And another question if i have make a traditional chinese for Hong Kong, how could i pull it to you.

@MrKai77
Copy link
Owner

MrKai77 commented Apr 16, 2024

whether it means that i should delete it and re-download it on my macbook?

You can download a test build here.

And another question if i have make a traditional chinese for Hong Kong, how could i pull it to you

Please make a new issue for this so that I can track it :)

@rs9c
Copy link

rs9c commented Jun 16, 2024

截屏2024-06-16 18 07 25

@KrLite “中键”的“键”译错了😀A wrong translation of "键".

Localizable.xcstrings.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Chinese localization ✨ Localization
5 participants