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 zh_Hans Localizations. And more. #482

Merged
merged 6 commits into from
Feb 16, 2024

Conversation

megabitsenmzq
Copy link
Contributor

@megabitsenmzq megabitsenmzq commented Jan 20, 2024

  1. Add new Localizations.
  • "Alert.CancelInstall.Runtimes.Title"
  • "Alert.DeletePlatform.PrimaryButton"
  • "Alert.DeletePlatform.Title"
  • "Perform post-install steps"
  • "Error"
  • "Open In Rosetta"
  • "Platforms"
  • "PlatformsList.Title"
  1. Fix some old Localizations. All contains "前置步骤" -> "安装后准备步骤".

  2. Remove old or useless Localizations.

  3. Create a file "String+.swift" to remove preview strings from localizations. Make it easier to work on translation.

  4. Use Text(verbatim: ) to remove preview strings from localizations. Make it easier to work on translation.

@megabitsenmzq megabitsenmzq changed the title Update zh_Hans Localizations. Update zh_Hans Localizations. And more. Jan 20, 2024
Copy link
Contributor

@MattKiazyk MattKiazyk left a comment

Choose a reason for hiding this comment

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

I'm not seeing the value in adding in the .hideInLocalizations unless I'm missing something? Can you elaborate?

Xcodes/Frontend/Common/String+.swift Outdated Show resolved Hide resolved
Copy link
Contributor

@MattKiazyk MattKiazyk left a comment

Choose a reason for hiding this comment

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

In researching other localization issues - I came across Text(verbatim:
https://developer.apple.com/documentation/swiftui/text/init(verbatim:)

Which is a more simpler solution for what you're trying to accomplish so that it doesn't go into the .xcstrings file.

Can you remove your hideInLocalizations variable and replace with verbatim where you want? Thanks

@megabitsenmzq
Copy link
Contributor Author

Got it! I will try it this weekend.

@megabitsenmzq
Copy link
Contributor Author

I found that although Text support initializes with init(verbatim: ), Picker or TextField don't have alternatives for this.

@megabitsenmzq
Copy link
Contributor Author

megabitsenmzq commented Feb 8, 2024

@MattKiazyk I removed "String+" and modified all Texts to use init(verbatim: ). For "Picker" and "TextField" and "Button" which are not supporting init(verbatim: ), I gave them labels with Texts. Please check it out.

@MattKiazyk
Copy link
Contributor

@megabitsenmzq thanks so much for those changes - can you just rebase and I'll get that merged in

@megabitsenmzq
Copy link
Contributor Author

@megabitsenmzq thanks so much for those changes - can you just rebase and I'll get that merged in

Done!

@MattKiazyk MattKiazyk added the localization Chore and new localizations label Feb 16, 2024
@MattKiazyk MattKiazyk merged commit 6f0cdc7 into XcodesOrg:main Feb 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
localization Chore and new localizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants