i18n: fix interpolation-based localization failures and add missing zh-Hans strings - #34
Open
xiangfeidexiaohuo wants to merge 1 commit into
Open
i18n: fix interpolation-based localization failures and add missing zh-Hans strings#34xiangfeidexiaohuo wants to merge 1 commit into
xiangfeidexiaohuo wants to merge 1 commit into
Conversation
…h-Hans strings
Fix three bugs where string interpolation prevented LocalizedStringKey
from matching defined translations:
- BrightnessSliderView: split ternary into three literal branches so
"Brightness control mode: DDC hardware" and "...Software emulation"
translations take effect instead of being looked up as "...: %@".
- MenuBarView: use Text(verbatim:) + NSLocalizedString to compose the
display state accessibility label from individually localized
fragments (", main display", ", expanded", ", collapsed").
- DisplayModeListView: replace string-interpolated accessibilityLabel
with explicit NSLocalizedString lookups so both the label and the
", selected" suffix are localized.
Add missing zh-Hans keys to Localizable.xcstrings:
- "Show Volume Sliders" -> "显示音量滑块"
- "Speaker volume" -> "扬声器音量"
- "DDC" -> "DDC"
- ", main display" -> ",主显示器"
- ", selected" -> ",已选中"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix three bugs where string interpolation prevented LocalizedStringKey
from matching defined translations:
"Brightness control mode: DDC hardware" and "...Software emulation"
translations take effect instead of being looked up as "...: %@".
display state accessibility label from individually localized
fragments (", main display", ", expanded", ", collapsed").
with explicit NSLocalizedString lookups so both the label and the
", selected" suffix are localized.
Add missing zh-Hans keys to Localizable.xcstrings:
What & why
How tested
Checklist
./dev.sh, or./scripts/release.sh v0.0.0-cifor the full release build)Crisp/Resources/Localizable.xcstringsfor any new user-facing strings