95
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.

Tasting i18n

Embed Size (px)

Citation preview

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.

CHALLENGESWhy it was a big thing to implement and test.

2

CHALLENGES & TASKS

3

CHALLENGES & TASKS

3

Keep it simple

CHALLENGES & TASKS

3

Keep it simple

Make it extensible & It has to be scalable

CHALLENGES & TASKS

3

Keep it simple

Make it extensible & It has to be scalable

(Re)architecting the product support of growing scope.

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

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

I18NUnderstand before you jump.

4

INTERNATIONALISATION - I18N

5

INTERNATIONALISATION - I18N

5

What is i18n?

INTERNATIONALISATION - I18N

5

What is i18n?

•Content Localisation

INTERNATIONALISATION - I18N

5

What is i18n?

•Content Localisation •Presentation of Content

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

6

CREATION OF DATA

7

CREATION OF DATA

7

Heavy Data dependent web application!

CREATION OF DATA

7

Heavy Data dependent web application!

Localised data with scripts styles, currency etc

CREATION OF DATA

7

Heavy Data dependent web application!

Localised data with scripts styles, currency etc

Less knowledge around Locale and Language specifics

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

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

CREATION OF DATA - SOME EXAMPLE OF APPS

8

CREATION OF DATA - SOME EXAMPLE OF APPS

8

CREATION OF DATA - SOME EXAMPLE OF APPS

8

CREATION OF DATA - SOME EXAMPLE OF APPS

8

CREATION OF DATA - SOME EXAMPLE OF APPS

9

CREATION OF DATA - SOME EXAMPLE OF APPS

9

CREATION OF DATA - SOME EXAMPLE OF APPS

9

CREATION OF DATA

10

CREATION OF DATA

10

Language specific Localised language text

(arabic)

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

Ruby Script

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

Ruby Script

CREATION OF DATA

10

Language specific Localised language text

(arabic)

Config forAll attributes to be changed

Ruby Script

DB

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

11

RTL IMPLEMENTATION - CHALLENGES

12

RTL IMPLEMENTATION - CHALLENGES

12

100s of modules developed for LTR

RTL IMPLEMENTATION - CHALLENGES

12

100s of modules developed for LTR

Implement RTL without breaking LTR

RTL IMPLEMENTATION - CHALLENGES

12

100s of modules developed for LTR

Implement RTL without breaking LTR

Creating Dynamic Sass is not possible

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.

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

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Override CSS

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

No worries about existing LTR

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

No worries about existing LTR

Disadvantages -

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

13

Advantages -

Override CSS

Quick to implement

No worries about existing LTR

Extra CSS Weight

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

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

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

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Divide & Write separate CSS

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page load remains same

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page load remains same

Very flexible and extendable

RTL IMPLEMENTATION - POSSIBLE SOLUTIONS

14

Advantages -

Divide & Write separate CSS

No Overrides of rules

Page load remains same

Very flexible and extendable

Provides customisability

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

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

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

RTL IMPLEMENTATION

15

RTL IMPLEMENTATION

15

Request

RTL IMPLEMENTATION

15

Request

RTL IMPLEMENTATION

15

RequestDetect

ContentDir

RTL IMPLEMENTATION

15

RequestDetect

ContentDir

RTL IMPLEMENTATION

15

Get LTR CSS

RequestDetect

ContentDir

RTL IMPLEMENTATION

15

Get LTR CSS

Get RTL CSS

RequestDetect

ContentDir

RTL IMPLEMENTATION

15

Get LTR CSS

Get RTL CSS

RequestDetect

ContentDir

RTL IMPLEMENTATION

15

Serve theLTR/RTL CSS

Get LTR CSS

Get RTL CSS

RequestDetect

ContentDir

RTL IMPLEMENTATION

16

DEMO

TESTING RTL

17

TESTING RTL - CHALLENGES

18

TESTING RTL - CHALLENGES

18

What to test? Data or Presentation?

TESTING RTL - CHALLENGES

18

What to test? Data or Presentation?

How much to test?

TESTING RTL - CHALLENGES

18

What to test? Data or Presentation?

How much to test?

What level of depth required in Testing?

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?

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

AUTOMATING CSSAutomating CSS for LTR and RTL (i18n)

19

AUTOMATING CSS - CHALLENGES

20

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

Automate data & markup

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

Automate data & markup

Automate existing LTR presentation

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

Automate data & markup

Automate existing LTR presentation

Automate RTL presentation with same old markup

AUTOMATING CSS - CHALLENGES

20

Separation of concerns!

Automate data & markup

Automate existing LTR presentation

Automate RTL presentation with same old markup

Automate comparisons

AUTOMATING CSS - SEPARATION OF AUTOMATION

21

AUTOMATING CSS - SEPARATION OF AUTOMATION

21

Jasmine for CSS testing

AUTOMATING CSS - SEPARATION OF AUTOMATION

21

Markup compilation with data validations

automation

Jasmine for CSS testing

AUTOMATING CSS - SEPARATION OF AUTOMATION

21

Markup compilation with data validations

automation

Automate CSS presentation.

Jasmine for CSS testing

AUTOMATING CSS

22

DEMO

AUTOMATING CSS

Restrictions

• Dynamic attributes/values testing is hard

• Testing attributes supported by HTML for ltr/rtl

• flex model

• display: inline-block

• transforms

23

24

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

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

25

For questions or suggestions:

Contact me - www.abhinavs.com/blog

@as_abhinav

THANK YOU