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

Update Traditional Chinese (zh-Hant) translation #198

Merged

Conversation

YuerLee
Copy link
Contributor

@YuerLee YuerLee commented Mar 5, 2023

Hi, I updated the Traditional Chinese:

  1. Use zh-Hant instead of zh-Hant-TW, as there is no other Hant translation currently.
  2. Add translations for new features that have not been translated previously.
  3. Try using "Easy to understand" for certain words, such as 斟滿 for activate and 清空杯子 for deactivate.

@YuanLiou
Copy link

YuanLiou commented Mar 5, 2023

I like names of different modes like 韜光養晦. It gives me an aesthetic feeling. These names elevate the translation.

@newmarcel
Copy link
Owner

newmarcel commented Mar 7, 2023

Very nice effort, thank you 🙂👍. I will be happy to merge this when it's ready.

As an optional hint, you can alternatively just work with the XLIFF files directly (e.g. in Localizations/KeepingYouAwake/zh-Hant-TW.xcloc/Localized Contents/zh-Hant-TW.xliff — or double-click the zh-Hant-TW.xcloc and open it in Xcode). These XML files contain all localized strings in a centralized location, which is easier to edit.

I use these to import/export the translations into the *.strings files whenever there are changes or when new Xcode versions are available. But in the end I also don't mind if the *.strings files are edited as well ^^… makes is probably easier for you to test.

Thanks!

@@ -1,12 +1,12 @@
{
"developmentRegion" : "en",
"project" : "KeepingYouAwake.xcodeproj",
"targetLocale" : "zh-Hant-TW",
Copy link
Owner

Choose a reason for hiding this comment

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

Is this an automatic change by Xcode or was it simply not properly set up before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I change to use zh-Hant instead of zh-Hant-TW, as there is no other Hant translation currently.

If someone adds another zh-Hant translation (e.g., zh-Hant-HK), I will update this translation to zh-Hant-TW then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realized that I forgot to remove the old translation files, removed in 7b60b2d.

@YuerLee
Copy link
Contributor Author

YuerLee commented Mar 7, 2023

Hi @newmarcel, thanks for the hint, here's the story.

Initially, I only updated the xliff file, but I encountered some issues:

  1. Some text sources were not included in the xliff file. To resolve this, I attempted to copy the en.xliff file to include all sources.
  2. I couldn't find some text on the app, such as Text Cell.
  3. Some text, like Activate when an external display is connected, could not be found in the en.xliff file.
  4. I was unsure which file, either the xliff or strings file, I should update.
  5. There are several strings files, not sure why.

As a result, I decided to build the app in Xcode and see what was going on. And decided to clean up the zh-Hant translation by regenerating the strings files, translating them, and exporting them to xliff.

Hope these changes won't require you to do any additional work.

@YuerLee YuerLee marked this pull request as ready for review March 17, 2023 15:54
Copy link

@YuanLiou YuanLiou left a comment

Choose a reason for hiding this comment

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

Looks nice!

@newmarcel
Copy link
Owner

Thanks @YuerLee for the explanations 👍.

I also very much appreciate the work and discussions that went into this PR and I'm very happy to just merge it 😺

Thanks everyone!

@newmarcel newmarcel merged commit c94a894 into newmarcel:main May 6, 2023
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.

3 participants