Top Banner
i18n TASTING I18N - ARCHITECTURE, DEVELOPMENT & TESTING Taste of implementing RTL on top of existing LTR to support Internationalisation (i18n), testing it to ensure we go smooth. Interesting hit was implementing & automating it.
95
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Tasting i18n

i 1 8 n

TASTING I18N - ARCHITECTURE, DEVELOPMENT & TESTING

Taste of implementing RTL on top of existing LTR to support Internationalisation (i18n), testing it to ensure we go smooth.

Interesting hit was implementing & automating it.

Page 2: Tasting i18n

CHALLENGESWhy it was a big thing to implement and test.

2

Page 3: Tasting i18n

CHALLENGES & TASKS

3

Page 4: Tasting i18n

CHALLENGES & TASKS

3

Keep it simple

Page 5: Tasting i18n

CHALLENGES & TASKS

3

Keep it simple

Make it extensible & It has to be scalable

Page 6: Tasting i18n

CHALLENGES & TASKS

3

Keep it simple

Make it extensible & It has to be scalable

(Re)architecting the product support of growing scope.

Page 7: Tasting i18n

CHALLENGES & TASKS

3

Keep it simple

Make it extensible & It has to be scalable

(Re)architecting the product support of growing scope.

Development in Continuous Delivery mode

Page 8: Tasting i18n

CHALLENGES & TASKS

3

Keep it simple

Make it extensible & It has to be scalable

(Re)architecting the product support of growing scope.

Development in Continuous Delivery mode

Create test data & Test strategy/approach

Page 9: Tasting i18n

I18NUnderstand before you jump.

4

Page 10: Tasting i18n

INTERNATIONALISATION - I18N

5

Page 11: Tasting i18n

INTERNATIONALISATION - I18N

5

What is i18n?

Page 12: Tasting i18n

INTERNATIONALISATION - I18N

5

What is i18n?

•Content Localisation

Page 13: Tasting i18n

INTERNATIONALISATION - I18N

5

What is i18n?

•Content Localisation •Presentation of Content

Page 14: Tasting i18n

CREATION OF DATADevelopment is hard unless you have localised data set. lets create data.

6

Page 15: Tasting i18n

CREATION OF DATA

7

Page 16: Tasting i18n

CREATION OF DATA

7

Heavy Data dependent web application!

Page 17: Tasting i18n

CREATION OF DATA

7

Heavy Data dependent web application!

Localised data with scripts styles, currency etc

Page 18: Tasting i18n

CREATION OF DATA

7

Heavy Data dependent web application!

Localised data with scripts styles, currency etc

Less knowledge around Locale and Language specifics

Page 19: Tasting i18n

CREATION OF DATA

7

Heavy Data dependent web application!

Localised data with scripts styles, currency etc

Less knowledge around Locale and Language specifics

Far east languages & script reading writing techniques

Page 20: Tasting i18n

CREATION OF DATA

7

Heavy Data dependent web application!

Localised data with scripts styles, currency etc

Less knowledge around Locale and Language specifics

Far east languages & script reading writing techniques

Languages which are read & written from Right To Left

Page 21: Tasting i18n

CREATION OF DATA - SOME EXAMPLE OF APPS

8

Page 22: Tasting i18n

CREATION OF DATA - SOME EXAMPLE OF APPS

8

Page 23: Tasting i18n

CREATION OF DATA - SOME EXAMPLE OF APPS

8

Page 24: Tasting i18n

CREATION OF DATA - SOME EXAMPLE OF APPS

8

Page 25: Tasting i18n

CREATION OF DATA - SOME EXAMPLE OF APPS

9

Page 26: Tasting i18n

CREATION OF DATA - SOME EXAMPLE OF APPS

9

Page 27: Tasting i18n

CREATION OF DATA - SOME EXAMPLE OF APPS

9

Page 28: Tasting i18n

CREATION OF DATA

10

Page 29: Tasting i18n

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Page 30: Tasting i18n

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

Page 31: Tasting i18n

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

Page 32: Tasting i18n

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

Page 33: Tasting i18n

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

Ruby Script

Page 34: Tasting i18n

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

Ruby Script

Page 35: Tasting i18n

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

Ruby Script

DB

Page 36: Tasting i18n

RTL DEVELOPMENTWe have markup already, lets change (or modify) presentation layer.

11

Page 37: Tasting i18n

RTL IMPLEMENTATION - CHALLENGES

12

Page 38: Tasting i18n

RTL IMPLEMENTATION - CHALLENGES

12

100s of modules developed for LTR

Page 39: Tasting i18n

RTL IMPLEMENTATION - CHALLENGES

12

100s of modules developed for LTR

Implement RTL without breaking LTR

Page 40: Tasting i18n

RTL IMPLEMENTATION - CHALLENGES

12

100s of modules developed for LTR

Implement RTL without breaking LTR

Creating Dynamic Sass is not possible

Page 41: Tasting i18n

RTL IMPLEMENTATION - CHALLENGES

12

100s of modules developed for LTR

Implement RTL without breaking LTR

Creating Dynamic Sass is not possible

Its not 100% mirror, some parts remain as is.

Page 42: Tasting i18n

RTL IMPLEMENTATION - CHALLENGES

12

100s of modules developed for LTR

Implement RTL without breaking LTR

Creating Dynamic Sass is not possible

Its not 100% mirror, some parts remain as is.

All interactions using JS has to be mirrored

Page 43: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Page 44: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Override CSS

Page 45: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Page 46: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

Page 47: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

No worries about existing LTR

Page 48: Tasting i18n

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

No worries about existing LTR

Page 49: Tasting i18n

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

No worries about existing LTR

Extra CSS Weight

Page 50: Tasting i18n

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

No worries about existing LTR Too many extra CSS rules

Extra CSS Weight

Page 51: Tasting i18n

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

No worries about existing LTR Too many extra CSS rules

Extra CSS Weight

Page load speed

Page 52: Tasting i18n

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

No worries about existing LTR Too many extra CSS rules

Extra CSS Weight

Page load speed

Less reliable and extendable

Page 53: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Page 54: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Divide & Write separate CSS

Page 55: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

Page 56: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page 57: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page load remains same

Page 58: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page load remains same

Very flexible and extendable

Page 59: Tasting i18n

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page load remains same

Very flexible and extendable

Provides customisability

Page 60: Tasting i18n

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page load remains same

Very flexible and extendable

Provides customisability

Page 61: Tasting i18n

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page load remains same

Hard to debug

Very flexible and extendable

Provides customisability

Page 62: Tasting i18n

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page load remains sameRequired extra effort in testing to make sure not breaking LTR/RTL in future

Hard to debug

Very flexible and extendable

Provides customisability

Page 63: Tasting i18n

RTL IMPLEMENTATION

15

Page 64: Tasting i18n

RTL IMPLEMENTATION

15

Request

Page 65: Tasting i18n

RTL IMPLEMENTATION

15

Request

Page 66: Tasting i18n

RTL IMPLEMENTATION

15

RequestDetect

ContentDir

Page 67: Tasting i18n

RTL IMPLEMENTATION

15

RequestDetect

ContentDir

Page 68: Tasting i18n

RTL IMPLEMENTATION

15

Get LTR CSS

RequestDetect

ContentDir

Page 69: Tasting i18n

RTL IMPLEMENTATION

15

Get LTR CSS

Get RTL CSS

RequestDetect

ContentDir

Page 70: Tasting i18n

RTL IMPLEMENTATION

15

Get LTR CSS

Get RTL CSS

RequestDetect

ContentDir

Page 71: Tasting i18n

RTL IMPLEMENTATION

15

Serve theLTR/RTL CSS

Get LTR CSS

Get RTL CSS

RequestDetect

ContentDir

Page 72: Tasting i18n

RTL IMPLEMENTATION

16

DEMO

Page 73: Tasting i18n

TESTING RTL

17

Page 74: Tasting i18n

TESTING RTL - CHALLENGES

18

Page 75: Tasting i18n

TESTING RTL - CHALLENGES

18

What to test? Data or Presentation?

Page 76: Tasting i18n

TESTING RTL - CHALLENGES

18

What to test? Data or Presentation?

How much to test?

Page 77: Tasting i18n

TESTING RTL - CHALLENGES

18

What to test? Data or Presentation?

How much to test?

What level of depth required in Testing?

Page 78: Tasting i18n

TESTING RTL - CHALLENGES

18

What to test? Data or Presentation?

How much to test?

What level of depth required in Testing?

Should we check the existing website?

Page 79: Tasting i18n

TESTING RTL - CHALLENGES

18

What to test? Data or Presentation?

How much to test?

What level of depth required in Testing?

Should we check the existing website?

Compare new LTR with old LTR to keep it intact

Page 80: Tasting i18n

AUTOMATING CSSAutomating CSS for LTR and RTL (i18n)

19

Page 81: Tasting i18n

AUTOMATING CSS - CHALLENGES

20

Page 82: Tasting i18n

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

Page 83: Tasting i18n

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

Automate data & markup

Page 84: Tasting i18n

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

Automate data & markup

Automate existing LTR presentation

Page 85: Tasting i18n

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

Automate data & markup

Automate existing LTR presentation

Automate RTL presentation with same old markup

Page 86: Tasting i18n

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

Automate data & markup

Automate existing LTR presentation

Automate RTL presentation with same old markup

Automate comparisons

Page 87: Tasting i18n

AUTOMATING CSS - SEPARATION OF AUTOMATION

21

Page 88: Tasting i18n

AUTOMATING CSS - SEPARATION OF AUTOMATION

21

Jasmine for CSS testing

Page 89: Tasting i18n

AUTOMATING CSS - SEPARATION OF AUTOMATION

21

Markup compilation with data validations

automation

Jasmine for CSS testing

Page 90: Tasting i18n

AUTOMATING CSS - SEPARATION OF AUTOMATION

21

Markup compilation with data validations

automation

Automate CSS presentation.

Jasmine for CSS testing

Page 91: Tasting i18n

AUTOMATING CSS

22

DEMO

Page 92: Tasting i18n

AUTOMATING CSS

Restrictions

• Dynamic attributes/values testing is hard

• Testing attributes supported by HTML for ltr/rtl

• flex model

• display: inline-block

• transforms

23

Page 93: Tasting i18n

24

But sometimes you need to stop your horses in urge to automate everything.

Page 94: Tasting i18n

Q & ADon’t shy to ask your doubts, but let me clear it that I’m not google also.

25

Page 95: Tasting i18n

For questions or suggestions:

Contact me - www.abhinavs.com/blog

@as_abhinav

THANK YOU