Simplify Localization with Design Pattern Automation

1,029 views

Published on

Localization is crucial for reaching out to a global audience, however, it’s often an afterthought for most developers and non-trivial to implement. Traditionally, game developers have outsourced this task due to its time consuming nature.

But it doesn’t have to be this way.

Yan Cui will show you a simple technique his team used at GameSys which allowed them to localize an entire story-driven, episodic MMORPG (with over 5000 items and 1500 quests) in under an hour of work and 50 lines of code, with the help of PostSharp.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,029
On SlideShare
0
From Embeds
0
Number of Embeds
664
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Simplify Localization with Design Pattern Automation

  1. 1. Simplify Localization with Design Pattern Automation an AOP success story by Yan Cui @theburningmonk
  2. 2. Hi, my name is Yan Cui @theburningmonk
  3. 3. plz ask question in the questions window
  4. 4. more text than first 3 Harry Porter books COMBINED!
  5. 5. localization needs to be applied in many, many places!
  6. 6. http://engt.co/2eQav4x
  7. 7. http://engt.co/2eQav4x
  8. 8. traditionally…
  9. 9. ingest gettext (.po) file
  10. 10. msgid = original text msgstr = localized text
  11. 11. ingest gettext (.po) file substitute display text
  12. 12. button.text = getLocalizedText("back"); label.text = getLocalizedText("baits"); monster.name = getLocalizedText(monster.name); ...
  13. 13. ingest gettext (.po) file substitute display text render translated text instead
  14. 14. but wait…
  15. 15. but wait… what if we add another type of domain object or add/change an screen?
  16. 16. ingest gettext (.po) file substitute display text render translated text instead
  17. 17. ingest gettext (.po) file substitute display text render translated text instead
  18. 18. http://engt.co/2eQav4x
  19. 19. hard to get good test coverage scope is too big
  20. 20. easy for regressions to creep in during frequent release cycles
  21. 21. 6 sins of traditional approach to localization large up-front development effort not future proof duplicated effort for each client platform hard to get good test coverage prone to regressions pressure on QA resources
  22. 22. THINK OUTSIDE
  23. 23. publisher service our pipeline
  24. 24. publisher service our pipeline + i’m a CMS
  25. 25. publisher service our pipeline validate pre-compute transform schema
  26. 26. yup, we iterate A LOT!
  27. 27. publisher service our pipeline flash/gamespec/298/… ios/gamespec/298/… server/gamespec/298/…
  28. 28. http://bit.ly/2fwvkmS
  29. 29. publisher service our pipeline chomp, chomp, chomp chomp, chomp, chomp chomp, chomp, chomp
  30. 30. publisher service our pipeline what if we localize here?
  31. 31. publisher service our pipeline so what goes here is already localized (where necessary)
  32. 32. 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/…
  33. 33. 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!
  34. 34. 6 sins of traditional approach to localization large up-front development effort not future proof duplicated effort for each client platform hard to get good test coverage prone to regressions pressure on QA resources
  35. 35. 6 sins of traditional approach to localization large up-front development effort not future proof duplicated effort for each client platform hard to get good test coverage prone to regressions pressure on QA resources
  36. 36. ingest gettext (.po) file substitute display text render translated text instead
  37. 37. server team
  38. 38. 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
  39. 39. 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!
  40. 40. “thou shall not burn me” - a server dev
  41. 41. to ingest .po files in .Net
  42. 42. to automate implementation patterns in .Net
  43. 43. ps. we had a convention of suffix DTO types with VO
  44. 44. 6 sins of traditional approach to localization large up-front development effort not future proof duplicated effort for each client platform hard to get good test coverage prone to regressions pressure on QA resources
  45. 45. 6 sins of traditional approach to localization large up-front development effort not future proof duplicated effort for each client platform hard to get good test coverage prone to regressions pressure on QA resources
  46. 46. 6 sins of traditional approach to localization large up-front development effort not future proof duplicated effort for each client platform hard to get good test coverage prone to regressions pressure on QA resources
  47. 47. Q. how do I exclude a DTO from localization?
  48. 48. Q. how do I exclude a DTO from localization? A. use [Localize(AttributeExclude = true)]
  49. 49. Q. where did the .po files come from?
  50. 50. Q. where did the .po files come from? A. TNT publisher service +.PO .PO
  51. 51. Q. where did the .po files come from? A. TNT publisher service +.PO .PO
  52. 52. Q. where did TNT get the .po files from?
  53. 53. A. you publisher service Q. where did TNT get the .po files from? game designer tool for generating new .po file
  54. 54. A. you publisher service Q. where did TNT get the .po files from? game designer tool for generating new .po file unchanged strings keep msgstr changed strings has empty msgstr
  55. 55. A. you publisher service Q. where did TNT get the .po files from? game designer tool for uploading .po file
  56. 56. @theburningmonk theburningmonk.com github.com/theburningmonk

×