kat momoi internationalization engineering team …...kat momoi internationalization engineering...
TRANSCRIPT
![Page 1: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/1.jpg)
Release criteria and mobile i18n testing toolbox
with mobile focus
Kat Momoi
Internationalization Engineering TeamGoogle
International Unicode Conference 40November 1 - 3, 2016
Santa Clara, CA, USA
![Page 2: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/2.jpg)
Google Confidential and Proprietary
Previous presentations
● 2014/IUC 38: Mobile I18n Testing Toolbox● 2015/IUC 39: Mobile I18n Testing Toolbox: 2015 updates
How to effectively test mobile apps products under:
● fast development cycles● products supporting many languages (over 70)
Focus on i18n testing -- not on L10n testing
![Page 3: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/3.jpg)
Google Confidential and Proprietary
Supported Locales per OS
● Android○ Nougat: 82 (+2)○ Marshmallow: 78 (+2)○ Lollipop: 71 (+2)○ KitKat: 56
● iOS 10.x: 41 (+lang-region combinations)○ iOS 9.1: 40 (+lang-region combinations)○ iOS 8: 40 (+lang-region combinations)○ iOS 7: 36
● Windows Phone ○ 10.x: 40 (111 w/packs)○ 8.1: 40 (109 w/ packs)
Cf. Chrome OS: 133● Many Google web apps support 60-74 locales -- likely to increase further
![Page 4: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/4.jpg)
Google Confidential and Proprietary
Challenges for I18n Testing
● Clearly separate i18n from L10n● Discover all i18n issues early ● Focus on localizability issues● Leave translation quality (L10n) issues to language services
○ Discover all other issues during development phase■ == problems that can be fixed by engineers
![Page 5: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/5.jpg)
Google Confidential and Proprietary
Our answer
● Establish i18n eng best practices + i18n release criteria checklist
● Get them adopted by eng projects
● Use them to gauge i18n readiness for launches● Use tools to reduce test time and efficiency
Tools … previously (IUC38, IUC39)
Mobile I18n Testing Toolbox
● A set of Mobile i18n tools and best practices● Dev teams should ensure “basic i18n test coverage” for each
release
![Page 6: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/6.jpg)
Google Confidential and Proprietary
Workflow assumptions
● Development teams are responsible for i18n code correctness○ No special work for i18n team to fix code issues
● Translation pipeline is automated○ original language → extraction of messages → translation services
→ returning translation data to source tree → integration into product UI
● Translation services: (not part of the eng process)○ translation via vendors○ review:
■ quality ■ product workflow■ cultural appropriateness
![Page 7: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/7.jpg)
Google Confidential and Proprietary
I18n best practices and checklist
● Eng teams to adopt i18n best practices and tools● Discover code related problem early● Use i18n checklist for launch approval
Checklist defines a basic quality bar that an engineering team can use for a launch
![Page 8: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/8.jpg)
Google Confidential and Proprietary
Major items of “Basic” i18n testing
● Functional breakages due to a language specific cause● Incorrect localized formats:
○ e.g. date, time, time zones, currency, name format, plurals, gender, sorting order (e.g. contacts list), segmentation, etc.
● UI breakage due to translation (e.g. text swelling)● Localizability problems:
○ Hard-coded strings○ String concatenation○ Lack of Plurals/Gender○ Message formatting issues for translation (misplaced placeholders, etc.)○ etc.
● Input issues○ Compatibility between keyboards and input fields (e.g. CJK IMEs)○ Data loss
● RTL mirroring & mixed text directionality
![Page 9: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/9.jpg)
Google Confidential and Proprietary
What I18n Testing includes:
but not easy to cover with standard i18n tools or automated tests:
● Special product features● Natural product workflow in a given locale (?)
○ e.g. Good user experience
These issues are corroborated via bug stats analysisOf over 3000 bugs
RTL, missing translations, locale formats, layout, IMEs, others
![Page 10: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/10.jpg)
Google Confidential and Proprietary
What I18n Testing Does Not Cover:
● Translation quality○ mistranslation○ less than optimal translation○ etc.
Translation quality is best covered by linguists and product evaluators and other evaluation systems
![Page 11: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/11.jpg)
Google Confidential and Proprietary
Testing tools/methods
● I18n/Android Lint● Pseudolocales (CLDR addition under review): LTR & RTL● Translation coverage tools (Android/iOS)● I18n sanity checker (API for unit tests)● Mock IMEs (Android, Chrome, iOS)● Input test with Unicode string: 2Îñţļ3国際化4● I18n Screenshot● Multi-locale tests● Visual check for RTL mirroring (RTL pseudolocale)
![Page 12: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/12.jpg)
Google Confidential and Proprietary
I18n release criteria: development focused
● All UI messages extracted for translation● All UI messages translated for all languages● No major UI layout breakages under any UI languages● In RTL languages, all UI elements mirrored correctly● The user can actually see chosen language UI● All functions work under the supported languages● Locale dependent formats are valid for all locales● Input fields/areas can process any Unicode characters● Char input fields/areas are compatible with keyboards● Special features work OK under supported languages
![Page 13: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/13.jpg)
Google Confidential and Proprietary
1. All UI messages extracted (for translation)
How to check
● Use message lint to prevent code error (Android)● Pseudolocale (en-XA): look for unaccented message
○ Potential issue■ dependent components not pseudolocalized
● Translation coverage tool○ Look for patterns of build config errors -- missing directories
![Page 14: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/14.jpg)
Google Confidential and Proprietary
2. All UI messages translated for all languages
How to check
● Translation coverage tool (Android/iOS) -- against .apk, .ipa○ compare master English message set with translation bundles○ report any missing translations○ analyze patterns of missing translations
■ A few missing translations in a few locales → delay in translation■ Same messages missing in all locales → build config issue■ Many same messages missing in some locales only → component locale
mismatch■ Extra translations for unsupported languages → component mismatch■ Etc. …
● Spot check key languages UI areas (3 - 5 langs)○ Scripts: Latin (de/fr), East Asian (ja/zh-CN), Arabic (ar), Cyrillic (ru),
Thai/Devanagari (th, hi)
![Page 15: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/15.jpg)
Google Confidential and Proprietary
3. No major layout breakages under any UI language
How to check
● Pseudolocales (en-XA/LTR, ar-XB/RTL)● Run Android i18n lint (RTL compatibility, RelativeOverlap) regularly● Spot check key languages UI
Best practices: automated script to ...● Provide original screenshots to translators: prevent length issues● Provide localized screenshots for linguistic reviews
![Page 16: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/16.jpg)
Google Confidential and Proprietary
4. In RTL UI languages, all UI elements mirrored correctly
How to check
● Pseudolocales (ar-XB/RTL) -- use regularly● Run Android i18n lint (RTL compatibility)● Spot check key languages UI
Best practices: ● Follow Bidi usability guidelines
○ https://goo.gl/GmfsTr
![Page 17: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/17.jpg)
Google Confidential and Proprietary
5. The user can actually see the chosen language UI
How to check
● An automated login test for all supported languages○ select/change language, login, check a few major UI items, logout
● Signup flow works in key languages w/matching keyboard
![Page 18: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/18.jpg)
Google Confidential and Proprietary
6. All functions work under the supported languages
How to check
● Run multi-locale functional tests● If running manual tests, run functional tests under key locales
● Spot check key languages UI areas (3 - 5 langs)○ Scripts: Latin (de/fr), East Asian (ja/zh-CN), Arabic (ar), Cyrillic (ru),
Thai/Devanagari (th, hi)
![Page 19: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/19.jpg)
Google Confidential and Proprietary
7. Locale dependent formats are valid for all locales
How to check
● Add I18n sanity check unit tests○ https://goo.gl/lpsMZt○ * Identify formats created by modifying output from i18n libs
■ date/time, sorted lists, timezone names, number formats, phone numbers, etc● Avoid manual tests as much as possible
![Page 20: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/20.jpg)
Google Confidential and Proprietary
8. Input fields/areas can process any Unicode characters
How to check
● Add input test for all text input fields/areas● Use a Unicode test string such as
○ 2Îñţļ3国際化4■ Covers UTF-8 1 - 4 byte characters
![Page 21: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/21.jpg)
Google Confidential and Proprietary
9. Char input fields/areas are compatible with keyboards
How to check
● Run simple keyboard tests against all your input areas○ Use mock IMEs (Android, Chrome, iOS)
■ Mock IMEs check against input field interference, e.g. auto suggestions
![Page 22: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/22.jpg)
Google Confidential and Proprietary
10. Special features work OK under supported languages
How to check
● Examples of special features○ Promos for certain countries/regions only○ Minimum age requirements for access:
■ 14: Spain, South Korea, 16: Holland, 13: the rest○ Subscriber only features (Youtube Red originals, etc.)
● Automated or manual tests
![Page 23: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/23.jpg)
Google Confidential and Proprietary
Effects of basic i18n checklist
Currently a pilot projects, the checklist
● Covers all important areas of i18n issues for product teams● Helps establish a common set of criteria for basic i18n quality bar
for releases● Allows dev teams to see what best practices they should adopt● Adds clarity to the use of i18n tools/methods● Makes it easier to separate i18n from l10n for development teams● Provides guide in dev teams handling of i18n issues early● Provides focus/direction on new tools development by the i18n
team● Allows translation service teams to focus on translation quality
issues
![Page 24: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/24.jpg)
Google Confidential and Proprietary
In summary
● Define i18n release criteria for (mostly) mobile projects● Simple to follow● Limited to 10 important criteria● Tools/methods for verification of items● Many tools already open sourced
○ Some are coming soon● Satisfying the checklist criteria means
○ Incorporating i18n into product design and dev process
○ Using i18n tools during development○ Passing “zero” i18n bugs to translation services
![Page 25: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/25.jpg)
Google Confidential and Proprietary
Open Sourcing (updated: 11/2016): 1
● New Pseudolocalizer○ Android SDK 23 (with L) and above
■ Part of AAPT Build tools: aapt --pseudo-localize○ Also part of latest Android Studio
■ “File” > “Project Structure” > "Build Types" > "Pseudo Locales Enabled"● Android Lint: 1 (in Android SDK)
○ RTL Compatibility○ Hardcoded text in layout files
○ Message correctness
○ RelativeLayoutOverlap (starting in SDK 24)
● Android Lint: 2 (after 3/2016)○ Hardcoded text in setText
○ String concatenation in setText
○ Number formatting in setText
![Page 26: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/26.jpg)
Google Confidential and Proprietary
Open Sourcing (updated: 11/2016): 2
● Mock IME test code and standalone app In an AOSP package -- pre-installed in emulators & source code (in SDK
24). An .apk package is also placed here for public access.○ Mock IME Test also uses Mock IME app ○ Chrome app and iOS mock IMEs (internal only at present) -- plan to
open source● Intl Sanity Checker:
○ Github: https://github.com/googlei18n/i18n_sanitycheck■ Java version (available)■ C++ (open sourcing planned)
● Pseudolocalization of CLDR: coming soon (ticket opened)● Android UI message utility: development complete. Open source
planned○ Allows user to override string resources in apps○ Edit translated messages in situ
![Page 27: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/27.jpg)
Google Confidential and Proprietary
Open Sourcing (updated: 11/2016): 3
● Translation coverage tool: planned for open sourcing in future○ Works with Android/iOS binaries○ Reports on missing and extraneous translations○ Provides analysis of error patterns and suggests how to fix○ To be used iteratively until only missing or extraneous translation
issues left are■ those due to timing - i.e. translations have not come in■ Those pulled in from supporting components with more languages support
than the app● I18n screenshots script for Android
○ Takes screenshots of a single UI page/panel iteratively for a list of locales with minimum human involvement
![Page 28: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/28.jpg)
Google Confidential and Proprietary
References
Mobile I18n Testing Toolbox updates: https://goo.gl/vHZQnv ● 2015: IUC 39
Mobile I18n Testing Toolbox: https://goo.gl/Q3jX3X● 2014: IUC 38
![Page 29: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/29.jpg)
Google Confidential and Proprietary
IUC 40: Release criteria and mobile i18n testing tools
Thank you!
![Page 30: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/30.jpg)
Google Confidential and Proprietary
![Page 31: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/31.jpg)
Google Confidential and Proprietary
Extra slides from IUC 39 presentation (2015)
Slides after this point are:
Selected slides from the previous IUC 39 presentation:
Mobile I18n Testing Toolbox 2015 updates
![Page 32: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/32.jpg)
Google Confidential and Proprietary
LTR Pseudolocale features: English (XA)
● What it looks like:○ Share what's new… → [Šĥåŕé ŵĥåţ'š ñéŵ... one two three]
● Algorithmically expanded text: (UI Breakage)○ UI is broken in this locale → quite likely to break in some real locales
● Accents on original text (Localizability)○ Lack of accents → hard coded strings!○ No translation when a message is not extracted from code
● The brackets show the boundary of a message. (Localizability)○ A single sentence is split into 2 or more brackets == an instance of
string concatenation: [Ţĥîš îš] [å bööķ]■ impossible to translate!
![Page 33: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/33.jpg)
Google Confidential and Proprietary
LTR (en-XA)
![Page 34: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/34.jpg)
Google Confidential and Proprietary
LTR Pseudolocale: Before (en)
![Page 35: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/35.jpg)
Google Confidential and Proprietary
LTR Pseudolocale: After (en-XA)
![Page 36: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/36.jpg)
Google Confidential and Proprietary
RTL Pseudolocale (Fake Bidi) Features
● (XB) العربیة● Built on en locale messages● Latin Alphabet characters acquire RTL property
○ Text flows right to left○ "!dlrow olleH" vs. "dlrow olleH!"
● Page elements/objects are mirrored● OS treats this pseudolocale as an RTL language
Easy to detect anomalies to the above patterns
![Page 37: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/37.jpg)
Google Confidential and Proprietary
RTL (ar-XB)
![Page 38: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/38.jpg)
Google Confidential and Proprietary
RTL Pseudolocale (ar-XB): Before (en locale)
![Page 39: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/39.jpg)
Google Confidential and Proprietary
RTL Pseudolocale: After (ar-XB)
![Page 40: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/40.jpg)
Google Confidential and Proprietary
Using pseudolocales
● Regular sanity check for localizability issues (5-10 min)● Focused use in early stage of new features● Regular use recommended
○ As UI stabilizes, use it as a sanity check item● Primary focus on i18n/localizability issues
○ Reduce language specific testing load■ Dogfood: encourage company-internal community for their native
language○ Coordinate with linguistic check for translation issues
● Recommend: developers to sanity check new UI
![Page 41: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/41.jpg)
Google Confidential and Proprietary
iOS App pseudolocale
● For iOS 7 and earlier, two existing locales to be replaced by en-XA and ar-XB translation data files
● Starting with iOS 8, much larger set of languages are supported○ Still not supporting arbitrary BCP47 locales like en-XA and ar-XB○ Use rarely used locales like: en-VI (LTR; en Virgin Islands) and ar-TD
(Arabic for Chad) ○ Also -- latest Xcode offers 2 pseudolocales
■ Double Length Pseudolanguage■ Right to Left Pseudolanguage
![Page 42: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/42.jpg)
Google Confidential and Proprietary
What may not be pseudolocalized
● User input text○ comments, posts, all circle names, profile data (including user name)
● Any text that is supplied by i18n libraries/CLDR (for now)○ Date/Time, Weekdays names, etc.
■ en-XA → same as ‘en’ (English)■ ar-XB → same as ‘ar’ (Arabic)
○ (Update) Pseudolocalization of CLDR available Google internally■ Next: open sourcing
● ASCII numbers● Text/strings from certain server side messages (usually
administrative types)● Text/strings from a different component service
![Page 43: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/43.jpg)
Google Confidential and Proprietary
Google Pseudolocales: Odds and Ends
● Brackets “[ ]” mark the boundaries of a translatable message○ [Ţĥîš îš] [å bööķ] <-- this is a case of concatenation & a bug
● »...« (�...�) indicates that the string inside the arrows was supplied by the app
○ [»Marco Nelissen« »«öŕîĝîñåļļý šĥåŕéð»«: one two three four five six]
● Should punctuation marks be pseudolocalized?○ generally No○ But there are some cases of this: U+2026
■ “[þĥöţöš one]” → but truncated to “[þĥ[“
● “[þĥ[“ ←- “[þĥ[…one]
![Page 44: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/44.jpg)
Google Confidential and Proprietary
Experimental Features
● CHARLIMIT○ We might design messages to include CHARLIMIT values as
calculated in ASCII characters by the developer● We might experiment with the following:
○ If pseudo text expansion is within CHARLIMIT, then use as is○ If pseudo text expansion is longer than CHARLIMIT, then use
CHARLIMIT for pseudo expansion lengthk
![Page 45: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/45.jpg)
Google Confidential and Proprietary
Pseudolocale Deployment Notes
Prep internal dev environment for en-XA, ar-XB:○ Standardize on these 2 locale names (on par with any ordinalry
locales)■ BCP 47 compliant■ Ensure that programming languages can process these 2 locales (BCP 47
compliant) -- remove any blockers■ Add them to build config■ Persuade all projects to use only these locale names
○ Make it super easy to build apps with these 2 pseudolocales, e.g.■ Option 1: (Android only) Create pseudolocales with AAPT build option■ Option 2: Automatically add data files for 2 pseudolocales at every source
update● Create them out of the master English file● Build with these 2 locales added to the build config
■ Option 3: If using Pseudolocalizer, make it a default to produce these 2 locales
![Page 46: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/46.jpg)
Google Confidential and Proprietary
IME/Keyboard Test
● Reliable check for compatibility problems between IME/Keyboard and a given input field in an app
● Typical problem: CJK input is prematurely committed making it impossible to enter correct characters
● Typical causes:○ Listener code is added to an input field in such a way to interfere with
an IME○ Additional feature such as “auto-suggest” is added to an input field
and interferes with normal keyboard input, especially for CJK IMEs
![Page 47: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/47.jpg)
Google Confidential and Proprietary
Android Standalone Mock IME App
● Android standalone Mock IME app:○ Test essential keyboard actions against a given input field
■ Checks if your app is compatible with various keyboards including CJK IMEs
○ Takes 30 seconds or so to run the essential compatibility tests on any input field■ A sanity check test when an input field has been modified
● (Update): Now a Chrome IME app
![Page 48: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/48.jpg)
Google Confidential and Proprietary
Android IME Test
● Android IME test: can run on Espresso○ Uses a mock IME and avoids the instability of real
IME/keyboards■ There are many keyboards!
○ Run it on any input fields with something on top of vanilla input box, e.g. added listener, auto suggestion feature, etc.
![Page 49: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/49.jpg)
Google Confidential and Proprietary
Mock IME App demo
● Chrome on Android○ Movie 1
● Google Keep on Android○ Movie 2
This app is open sourced in AOSP
![Page 50: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/50.jpg)
Google Confidential and Proprietary
Layout Tests
● Added to Android code lint● Coming in future:
○ a set of automated layout breakage tests that run on Espresso -- on the pseudolocale, en-XA
![Page 51: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/51.jpg)
Google Confidential and Proprietary
Lint for Layout Breakage check
$ lint --check RelativeOverlap
...photoeditor/res/layout/*.xml
Scanning photoeditor: ............res/layout/filter_parameter_fragment.xml:71: Warning: @id/third_tool_button can overlap LinearLayout-1 if LinearLayout-1, @id/third_tool_button grow due to localized text expansion [RelativeOverlap] <...photoeditor.views.ToolButton ^0 errors, 1 warnings
![Page 52: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/52.jpg)
Google Confidential and Proprietary
Photoeditor in Ukrainian
![Page 53: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/53.jpg)
Google Confidential and Proprietary
Summary of Android I18n Lint Modules: 1
■ RTL Compatibility - checks that your application does not use
left and right constants, i.e. incorrect for RTL languages. Use
start and end instead.
■ Hardcoded text in layout files - reference translatable strings
in strings.xml instead of hard coded messages for your UI, e.g.
text=”@string/helloworld” with an entry in strings.xml
■ Message correctness - check for placeholders match in all
translations and quantity variants match translation language.
E.g. check that Russian translation of a plural has four variants
(one, few, many, other)
■ RelativeOverlap --- check for object overlaps
![Page 54: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/54.jpg)
Google Confidential and Proprietary
Summary of Android I18n Lint Modules: 2
■ Hardcoded text in setText (new) - checks that application does
not pass a hardcoded string into a UI widget setText method.
■ String concatenation in setText (new) - checks that string
concatenation is not used when calling UI weiget setText method.
Concatenated strings are not translatable in most cases.
■ Number formatting in setText (new) - checks that methods
like Integer.toString() or Long.toString() are not used for number
formatting when displaying text to user. These methods format
numbers using ASCII digits only, while locale may require native
digits (e.g. Arabic). Use String.format instead.
![Page 55: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/55.jpg)
Google Confidential and Proprietary
CLDR Pseudolocale
![Page 56: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/56.jpg)
Google Confidential and Proprietary
CLDR Pseudolocalization Specifics
Yes:
1. Languages, territories and variants names2. Month and weekdays names (various calendars)3. Datetime formatting patterns (brackets only)4. Time zones5. Relative date and time (yesterday, tomorrow, in N days, last Sunday)6. List patterns ([a, b åñð c one])
No:
0. nothing in root.xml1. Unit names (mile, fahrenheit)2. Currencies3. Calendars
![Page 57: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/57.jpg)
Google Confidential and Proprietary
Android String Override Tool: what is it?
Allows overriding of resource strings on a running app● Does not require any code modifications or special build ● Works with any Android application
Potential uses:- Adding invisible characters into overriden strings and determine what exact strings are used on a given screen- Expand/double original strings to check if application UI is flexible enough to support translation to different languages. It allows to find UI limitations or potential issues before translations are available.
![Page 58: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/58.jpg)
Google Confidential and Proprietary
Android String Override: how it works
1. Run the override app with a setup script passing name of app to override2. Push a text file with override strings to the device.3. When the app redraws its content, overriden values are used.4. To try out a new string value, update the entry in the override file
● Push it to device. The change is applied automatically
![Page 59: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/59.jpg)
Google Confidential and Proprietary
Conclusions
Mobile I18n Testing Toolbox
● Focus on early detection of i18n/localizability issues○ Developer focused
● Designed to address the major areas of i18n testing/dev● Time saving and efficient● More features are planned ...
![Page 60: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/60.jpg)
Google Confidential and Proprietary
Q&A
Questions/Comments?
![Page 61: Kat Momoi Internationalization Engineering Team …...Kat Momoi Internationalization Engineering Team Google International Unicode Conference 40 November 1 - 3, 2016 Santa Clara, CA,](https://reader033.vdocuments.us/reader033/viewer/2022042307/5ed2edc682b1917a215e8372/html5/thumbnails/61.jpg)
Google Confidential and Proprietary
Internationalization (I18n) vs. Localization (L10n)
Internationalization is enabling your product code so that it can be localized/translated into different languages without modifying the core code● I18n is design
Localization provides translation of messages, charts/graphs, and images for supported languages/locales without touching the core product code● Localizable resources must be extracted from code