![Page 1: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/1.jpg)
Simplify Localization with Design Pattern Automation
an AOP success story by Yan Cui@theburningmonk
![Page 2: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/2.jpg)
Hi, my name is Yan Cui@theburningmonk
![Page 3: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/3.jpg)
plz ask question in the questions window
![Page 4: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/4.jpg)
Watch the webinar recording here:
http://www.postsharp.net/blog/post/ webinar-recording-localization
![Page 5: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/5.jpg)
![Page 6: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/6.jpg)
![Page 7: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/7.jpg)
![Page 8: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/8.jpg)
![Page 9: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/9.jpg)
more text than first 3 Harry Porter books COMBINED!
![Page 10: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/10.jpg)
![Page 11: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/11.jpg)
![Page 12: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/12.jpg)
![Page 13: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/13.jpg)
localization needs to be applied in many, many places!
![Page 16: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/16.jpg)
traditionally…
![Page 17: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/17.jpg)
ingest gettext (.po) file
![Page 18: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/18.jpg)
![Page 19: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/19.jpg)
msgid = original text msgstr = localized text
![Page 20: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/20.jpg)
ingest gettext (.po) file
substitute display text
![Page 21: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/21.jpg)
Watch the webinar recording here:
http://www.postsharp.net/blog/post/ webinar-recording-localization
![Page 22: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/22.jpg)
button.text = getLocalizedText("back");
label.text = getLocalizedText("baits");
monster.name = getLocalizedText(monster.name);
...
![Page 23: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/23.jpg)
ingest gettext (.po) file
substitute display text
render translated text instead
![Page 24: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/24.jpg)
![Page 25: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/25.jpg)
![Page 26: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/26.jpg)
but wait…
![Page 27: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/27.jpg)
but wait…what if we add another type of domain object or add/change
an screen?
![Page 28: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/28.jpg)
ingest gettext (.po) file
substitute display text
render translated text instead
![Page 29: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/29.jpg)
ingest gettext (.po) file
substitute display text
render translated text instead
![Page 31: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/31.jpg)
hard to get good test coverage scope is too big
![Page 32: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/32.jpg)
easy for regressions to creep in during frequent release cycles
![Page 33: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/33.jpg)
6 sins of traditional approach to localization
large up-front development effortnot future proof
duplicated effort for each client platformhard to get good test coverage
prone to regressionspressure on QA resources
![Page 34: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/34.jpg)
![Page 35: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/35.jpg)
THINK OUTSIDE
![Page 36: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/36.jpg)
publisher service
our pipeline
![Page 37: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/37.jpg)
publisher service
our pipeline
+
i’m a CMS
![Page 38: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/38.jpg)
![Page 39: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/39.jpg)
![Page 40: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/40.jpg)
publisher service
our pipeline
validate pre-compute transform schema
![Page 41: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/41.jpg)
![Page 42: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/42.jpg)
yup, we iterate A LOT!
![Page 43: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/43.jpg)
Watch the webinar recording here:
http://www.postsharp.net/blog/post/ webinar-recording-localization
![Page 44: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/44.jpg)
publisher service
our pipeline
flash/gamespec/298/… ios/gamespec/298/… server/gamespec/298/…
![Page 45: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/45.jpg)
![Page 47: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/47.jpg)
publisher service
our pipeline
chomp, chomp, chomp
chomp, chomp, chomp
chomp, chomp, chomp
![Page 48: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/48.jpg)
publisher service
our pipeline
what if we localize here?
![Page 49: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/49.jpg)
publisher service
our pipeline
so what goes here is already localized (where
necessary)
![Page 50: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/50.jpg)
publisher service
our pipeline
flash/gamespec/en_GB/298/… flash/gamespec/pt_BR/298/… ios/gamespec/en_GB/298/… ios/gamespec/pt_BR/298/… server/gamespec/298/…
![Page 51: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/51.jpg)
publisher service
our pipeline
flash/gamespec/en_GB/298/… flash/gamespec/pt_BR/298/… ios/gamespec/en_GB/298/… ios/gamespec/pt_BR/298/… server/gamespec/298/…
don’t localize my stuff!
![Page 52: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/52.jpg)
6 sins of traditional approach to localization
large up-front development effortnot future proof
duplicated effort for each client platformhard to get good test coverage
prone to regressionspressure on QA resources
![Page 53: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/53.jpg)
6 sins of traditional approach to localization
large up-front development effortnot future proof
duplicated effort for each client platformhard to get good test coverage
prone to regressionspressure on QA resources
![Page 54: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/54.jpg)
ingest gettext (.po) file
substitute display text
render translated text instead
![Page 55: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/55.jpg)
server team
![Page 56: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/56.jpg)
1. ingest gettext (.po) file
2. check domain objects for string fields/properties
3. use localized text when transforming to DTO
4. repeat for next language
![Page 57: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/57.jpg)
1. ingest gettext (.po) file
2. check domain objects for string fields/properties
3. use localized text when transforming to DTO
4. repeat for next language
hey Watson! I found a Pattern!
![Page 58: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/58.jpg)
“thou shall not burn me” - a server dev
![Page 59: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/59.jpg)
to ingest .po files in .Net
![Page 60: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/60.jpg)
to automate implementation patterns in .Net
![Page 61: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/61.jpg)
![Page 62: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/62.jpg)
![Page 63: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/63.jpg)
![Page 64: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/64.jpg)
![Page 65: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/65.jpg)
![Page 66: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/66.jpg)
ps. we had a convention of suffix DTO types with VO
![Page 67: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/67.jpg)
6 sins of traditional approach to localization
large up-front development effortnot future proof
duplicated effort for each client platformhard to get good test coverage
prone to regressionspressure on QA resources
![Page 68: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/68.jpg)
Watch the webinar recording here:
http://www.postsharp.net/blog/post/ webinar-recording-localization
![Page 69: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/69.jpg)
6 sins of traditional approach to localization
large up-front development effortnot future proof
duplicated effort for each client platformhard to get good test coverage
prone to regressionspressure on QA resources
![Page 70: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/70.jpg)
6 sins of traditional approach to localization
large up-front development effortnot future proof
duplicated effort for each client platformhard to get good test coverage
prone to regressionspressure on QA resources
![Page 71: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/71.jpg)
Q. how do I exclude a DTO from localization?
![Page 72: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/72.jpg)
Q. how do I exclude a DTO from localization?
A. use [Localize(AttributeExclude = true)]
![Page 73: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/73.jpg)
Q. where did the .po files come from?
![Page 74: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/74.jpg)
Q. where did the .po files come from?
A. TNT
publisher service
+.PO
.PO
![Page 75: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/75.jpg)
Q. where did the .po files come from?
A. TNT
publisher service
+.PO
.PO
![Page 76: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/76.jpg)
Q. where did TNT get the .po files from?
![Page 77: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/77.jpg)
A. you
publisher service
Q. where did TNT get the .po files from?
game designer
tool for generating new .po file
![Page 78: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/78.jpg)
![Page 79: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/79.jpg)
![Page 80: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/80.jpg)
A. you
publisher service
Q. where did TNT get the .po files from?
game designer
tool for generating new .po fileunchanged strings keep msgstrchanged strings has empty msgstr
![Page 81: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/81.jpg)
A. you
publisher service
Q. where did TNT get the .po files from?
game designer
tool for uploading .po file
![Page 82: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/82.jpg)
Watch the webinar recording here:
http://www.postsharp.net/blog/post/ webinar-recording-localization
![Page 83: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/83.jpg)
![Page 84: Solving Localization Challenges with Design Pattern Automation](https://reader031.vdocument.in/reader031/viewer/2022021919/58705d541a28aba2118b6ea3/html5/thumbnails/84.jpg)
@theburningmonktheburningmonk.comgithub.com/theburningmonk