Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Solving Localization Challenges with Design Pattern Automation

390 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: Software
  • Be the first to comment

  • Be the first to like this

Solving Localization Challenges 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. Watch the webinar recording here: http://www.postsharp.net/blog/post/ webinar-recording-localization
  5. 5. more text than first 3 Harry Porter books COMBINED!
  6. 6. localization needs to be applied in many, many places!
  7. 7. http://engt.co/2eQav4x
  8. 8. http://engt.co/2eQav4x
  9. 9. traditionally…
  10. 10. ingest gettext (.po) file
  11. 11. msgid = original text msgstr = localized text
  12. 12. ingest gettext (.po) file substitute display text
  13. 13. Watch the webinar recording here: http://www.postsharp.net/blog/post/ webinar-recording-localization
  14. 14. button.text = getLocalizedText("back"); label.text = getLocalizedText("baits"); monster.name = getLocalizedText(monster.name); ...
  15. 15. ingest gettext (.po) file substitute display text render translated text instead
  16. 16. but wait…
  17. 17. but wait… what if we add another type of domain object or add/change an screen?
  18. 18. ingest gettext (.po) file substitute display text render translated text instead
  19. 19. ingest gettext (.po) file substitute display text render translated text instead
  20. 20. http://engt.co/2eQav4x
  21. 21. hard to get good test coverage scope is too big
  22. 22. easy for regressions to creep in during frequent release cycles
  23. 23. 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
  24. 24. THINK OUTSIDE
  25. 25. publisher service our pipeline
  26. 26. publisher service our pipeline + i’m a CMS
  27. 27. publisher service our pipeline validate pre-compute transform schema
  28. 28. yup, we iterate A LOT!
  29. 29. Watch the webinar recording here: http://www.postsharp.net/blog/post/ webinar-recording-localization
  30. 30. publisher service our pipeline flash/gamespec/298/… ios/gamespec/298/… server/gamespec/298/…
  31. 31. http://bit.ly/2fwvkmS
  32. 32. publisher service our pipeline chomp, chomp, chomp chomp, chomp, chomp chomp, chomp, chomp
  33. 33. publisher service our pipeline what if we localize here?
  34. 34. publisher service our pipeline so what goes here is already localized (where necessary)
  35. 35. 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/…
  36. 36. 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!
  37. 37. 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
  38. 38. 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
  39. 39. ingest gettext (.po) file substitute display text render translated text instead
  40. 40. server team
  41. 41. 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
  42. 42. 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!
  43. 43. “thou shall not burn me” - a server dev
  44. 44. to ingest .po files in .Net
  45. 45. to automate implementation patterns in .Net
  46. 46. ps. we had a convention of suffix DTO types with VO
  47. 47. 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
  48. 48. Watch the webinar recording here: http://www.postsharp.net/blog/post/ webinar-recording-localization
  49. 49. 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
  50. 50. 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
  51. 51. Q. how do I exclude a DTO from localization?
  52. 52. Q. how do I exclude a DTO from localization? A. use [Localize(AttributeExclude = true)]
  53. 53. Q. where did the .po files come from?
  54. 54. Q. where did the .po files come from? A. TNT publisher service +.PO .PO
  55. 55. Q. where did the .po files come from? A. TNT publisher service +.PO .PO
  56. 56. Q. where did TNT get the .po files from?
  57. 57. A. you publisher service Q. where did TNT get the .po files from? game designer tool for generating new .po file
  58. 58. 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
  59. 59. A. you publisher service Q. where did TNT get the .po files from? game designer tool for uploading .po file
  60. 60. Watch the webinar recording here: http://www.postsharp.net/blog/post/ webinar-recording-localization
  61. 61. @theburningmonk theburningmonk.com github.com/theburningmonk

×