Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Simplified Chinese localization #7316

Merged
merged 4 commits into from
Dec 9, 2016
Merged

Simplified Chinese localization #7316

merged 4 commits into from
Dec 9, 2016

Conversation

YunjieLi
Copy link
Contributor

@YunjieLi YunjieLi commented Dec 7, 2016

Per chat w/ @1ec5 adding the Chinese localization.

@mention-bot
Copy link

@YunjieLi, thanks for your PR! By analyzing this pull request, we identified @1ec5, @boundsj and @friedbunny to be potential reviewers.

@YunjieLi
Copy link
Contributor Author

YunjieLi commented Dec 7, 2016

A few notes:

  • didn't touch the .stringsdict since they're not needed for Chinese.
  • left out two strings that look like error messages in localizable.strings.
  • Not sure what this means "MAP_A11Y_VALUE" = "Zoom %1$dx\n%2$ld annotation(s) visible";
  • telemetry is 传感数据 according to @xinnong
  • used 你 not 您 (like tu vs. vous in French) for you to make it sound more friendly and less businesslike

"COMPASS_A11Y_LABEL" = "指南针";

/* Compass abbreviation for north */
"COMPASS_NORTH" = "N";
Copy link
Contributor

Choose a reason for hiding this comment

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

This string is the text that is displayed at the top of the compass image. Apple Maps uses 北 for Chinese/Japanese (and I’m likely to do the same when we add a Japanese localization to this SDK) — any objections to us using 北 in Chinese, too?

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 personally prefer N for brevity but no objections!

Copy link
Contributor

Choose a reason for hiding this comment

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

北 fits and is consistent with MapKit’s Chinese localizations, so let’s go with that.

Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

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

The translations appear to be consistent with CLDR and the Chinese Wikipedia.

Would you do the honors and mention the new Simplified Chinese localization in the relevant section of platform/ios/CHANGELOG.md and platform/macos/CHANGELOG.md?

@@ -1,6 +1,16 @@
{
"images" : [
{
"idiom" : "iphone",
Copy link
Contributor

Choose a reason for hiding this comment

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

These changes look unrelated. If they’re needed, would you mind splitting them out into a separate PR? Thanks.

Copy link
Contributor Author

@YunjieLi YunjieLi Dec 9, 2016

Choose a reason for hiding this comment

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

I did not make that change manually. can I just revert the changes manually?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure.

<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Since Chinese doesn’t need to pluralize any strings, leave this file out so Chinese speakers don’t see English. COORD_DEG_LONG etc. are already defined in Localizable.strings.

"FIRST_STEPS_URL" = "mapbox.com/help/first-steps-ios-sdk";

/* Accessibility hint */
"INFO_A11Y_HINT" = "显示致谢,用户反馈及更多";
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the list items be separated by or ?

"MAP_A11Y_LABEL" = "地图";

/* Map accessibility value */
"MAP_A11Y_VALUE" = "Zoom %1$dx\n%2$ld annotation(s) visible";
Copy link
Contributor

Choose a reason for hiding this comment

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

After the user zooms the map, VoiceOver says, for example:

Zoom 2x
12 annotations visible

%1d is a placeholder for the zoom scale (but x is pronounced literally in English). \n is a newline. %2$ld is a placeholder for the number of visible annotations.

If “annotations” doesn’t translate well, you can try something like “pins”, “markers”, or “map items”.

<key>MAP_A11Y_VALUE</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>Zoom %dx
Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise, you can leave this file out too.

"ANNOTATION_A11Y_HINT" = "显示信息";

/* No comment provided by engineer. */
"API_CLIENT_400_DESC" = "The session data task failed. Original request was: %@";
Copy link
Contributor

Choose a reason for hiding this comment

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

These error messages come from Mapbox Telemetry. In general, error messages should be translated whenever possible. However, in this case, they aren’t ever presented to the user, so it’s fine to leave these messages in English.

"COMPASS_A11Y_LABEL" = "指南针";

/* Compass abbreviation for north */
"COMPASS_NORTH" = "N";
Copy link
Contributor

Choose a reason for hiding this comment

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

北 fits and is consistent with MapKit’s Chinese localizations, so let’s go with that.

@1ec5
Copy link
Contributor

1ec5 commented Dec 7, 2016

This PR is targeted at the master branch. It’s probably too late to take this PR for v3.4.0, but I think we could get it into v3.4.1 as long as we rebase the branch and retarget the PR upon the release-ios-v3.4.0 branch.

@1ec5 1ec5 added Google Maps parity For feature parity with the Google Maps SDK for Android or iOS iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS MapKit parity For feature parity with MapKit on iOS or macOS labels Dec 7, 2016
@1ec5 1ec5 changed the title Chinese localization Simplified Chinese localization Dec 7, 2016
@1ec5 1ec5 added this to the ios-3.4.1 milestone Dec 7, 2016
@1ec5 1ec5 added the localization Human language support and internationalization label Dec 7, 2016
@YunjieLi
Copy link
Contributor Author

YunjieLi commented Dec 9, 2016

@friedbunny @1ec5 just incorporated the feedbacks above. Want to take another look?

Copy link
Contributor

@friedbunny friedbunny left a comment

Choose a reason for hiding this comment

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

Thanks!

@1ec5 1ec5 removed the macOS Mapbox Maps SDK for macOS label Dec 9, 2016
@@ -5,6 +5,7 @@
* Labels written in Arabic, Hebrew, and other scripts are written right-to-left. Arabic characters are correctly shaped. ([#6984](https://github.com/mapbox/mapbox-gl-native/pull/6984), [#7123](https://github.com/mapbox/mapbox-gl-native/pull/7123))
* Improved the line wrapping behavior of point-placed labels written in Chinese, Japanese, and Yi. ([#6828](https://github.com/mapbox/mapbox-gl-native/pull/6828))
* Fixed an issue where translucent point annotations along tile boundaries would be drawn darker than expected. ([#6832](https://github.com/mapbox/mapbox-gl-native/pull/6832))
* Added the Simplified Chinese localization. ([#7316](https://github.com/mapbox/mapbox-gl-native/pull/7316))
Copy link
Contributor

Choose a reason for hiding this comment

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

I just realized this PR doesn’t actually localize the macOS SDK. It could – you’d add the localization to macos.xcodeproj, reuse platform/darwin/resources/zh-Hans.lproj/Foundation.strings, and add platform/macos/resources/zh-Hans.lproj/Localizable.strings (just 10 easy strings). But we can take care of that in a separate PR. Would you mind removing this changelog entry in the meantime?

Copy link
Contributor

Choose a reason for hiding this comment

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

#7371

@1ec5 1ec5 modified the milestones: ios-v3.5.0, ios-3.4.1 Dec 9, 2016
@YunjieLi YunjieLi merged commit ffd74c3 into master Dec 9, 2016
@friedbunny friedbunny deleted the local-zh branch December 9, 2016 21:24
@friedbunny
Copy link
Contributor

Oh, sorry, we forgot to mention one thing: because this is such a busy repo with so many different platforms, we prefix commits messages with the affected platforms. E.g., [ios] Added super-awesome localization.

Just something to keep in mind for next time. 👍

@YunjieLi
Copy link
Contributor Author

Roger that @friedbunny

@1ec5
Copy link
Contributor

1ec5 commented Dec 10, 2016

Opened #7370 for a Traditional Chinese localization based on this one and #7371 for a Simplified Chinese localization in the macOS SDK.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Google Maps parity For feature parity with the Google Maps SDK for Android or iOS iOS Mapbox Maps SDK for iOS localization Human language support and internationalization MapKit parity For feature parity with MapKit on iOS or macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants