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

Chinese translation #813

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@
<string name="sunevent_title">太阳</string> <!-- (custom) sun event title; e.g. "Sun 6°" -->
<string name="sunevent_title_format">%1$s %2$s</string> <!-- (custom) sun event title; e.g. "Sun 6°" -->
<string name="sunevent_summary_format"><xliff:g id="title">%1$s</xliff:g> 于 <xliff:g id="angle">%2$s</xliff:g></string> <!-- (custom) sun event summary; e.g. "Sun 6°" -->
<string name="sunevent_phrase_gender">其他</string> <!-- either 'other' or 'female' (SelectFormat api) -->
Copy link
Owner

@forrestguice forrestguice Aug 7, 2024

Choose a reason for hiding this comment

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

These _gender values are unusual. Translations can override them, but the expected value is always 'other' or 'female', which allows matching gender/plurality between some noun and its articles.

For example, offset_before_msg1 defines
{0} before {1, plural, one {{2, select, female {} other {}}} other {{2, select, female {} other {}}}}{3}
(which is basically empty / does nothing).

The Spanish version then overrides this with {0} antes {1, plural, one {{2, select, female {de la} other {del}}} other {{2, select, female {de las} other {de los}}}} {3}. The provided _gender determines if this prints de la <noun> vs del <noun>, etc.

https://developer.android.com/reference/android/icu/text/SelectFormat
Its really confusing in my opinion, and since most languages don't seem to need them, I'll probably comment them out everywhere.

<!--<string name="sunevent_phrase_gender">other</string>--> <!-- either 'other' or 'female' (SelectFormat api) -->

<string name="shadowevent_title">阴影</string> <!-- (custom) shadow length event title; e.g. "Shadow 6m" -->

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@
<string name="sunevent_title">太陽</string> <!-- (custom) sun event title; e.g. "Sun 6°" -->
<string name="sunevent_title_format">%1$s %2$s</string> <!-- (custom) sun event title; e.g. "Sun 6°" -->
<string name="sunevent_summary_format"><xliff:g id="title">%1$s</xliff:g> 於 <xliff:g id="angle">%2$s</xliff:g></string> <!-- (custom) sun event summary; e.g. "Sun 6°" -->
<string name="sunevent_phrase_gender">其他</string> <!-- either other or female (SelectFormat api) -->
<!--<string name="sunevent_phrase_gender">other</string>--> <!-- either other or female (SelectFormat api) -->

<string name="shadowevent_title">陰影</string> <!-- (custom) shadow length event title; e.g. "Shadow 6m" -->

Expand Down
Loading