localising an appinventor app

63
LRC Summer School 2012 Localising an AppInventor App Lucía Morado Vázquez Chris Exton Aram Morera Mesa

Upload: others

Post on 09-Feb-2022

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Localising an AppInventor App

LRC Summer School 2012

Localising an AppInventor App

Lucía Morado Vázquez – Chris Exton – Aram Morera Mesa

Page 2: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Overview

Introduction

Hands-on Session

Note: This session builds on a previous session, where an application was developed using the MIT AppInventor Platform. Although instructions are given so you can carry out this activity standalone, we highly recommend you to take one of the AppInventor beginners tutorials to get familiar with the platform prior to the commencement of this course. Tutorials can be found here: http://beta.appinventor.mit.edu/learn/tutorials/index.html

Page 3: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Purpose

Localise an App Inventor Mobile Application (into another language).

Page 4: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Roles

Localisation Engineer

Translator

QA Tester

Page 5: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Tools

Notepad++

To explore the source code.

To introduce some minor changes.

SDL Trados Studio 2009

To extract the localisable text.

To translate the text.

AppInventor Platform

To internationalise the code.

To compile the resulting source code.

To test the application.

Page 6: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Workflow

1. Explore the application.

2. Explore the source code.

3. Evaluate different localisation strategies.

4. Extract the localisable text (filters).

5. Translate.

6. Merge and compile the new source code.

7. Test the application.

Page 7: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Warning!

Source Code Ahead!!

If you get lost, ask me or Aram.

Page 8: Localising an AppInventor App

LRC Summer School 2012

Explore the application

Page 9: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

If you have not finished the previous section activity or if you start this session from scratch you will need to:

-Download the code of the application from www.localisation.ie/lrcsummer/lrcquiz.zip.

-Upload it to the AppInventor platform, open the Blocks Editor and create an Emulator to explore the application.

1. Download the application

Page 10: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Identify the localisable content

1. Explore the application

Page 11: Localising an AppInventor App

LRC Summer School 2012

Explore the source code

Page 12: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

2. Explore the source code

-Download the source code of the application (you might skip this step if you have already get the code from the LRC

website). My Projects>More Actions>Download Source

Page 13: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Unzip the file

2. Explore the source code

Page 14: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

2. Explore the source code

Make a backup copy!!!

Page 15: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

2. Explore the source code

Explore the three folders and their content:

assets it contains the resource files (images, sounds, etc.)

Page 16: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

2. Explore the source code

Explore the three folders and their content:

youngandroidproject

it contains a properties file with the basic information of the project.

Package and class name

Page 17: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

2. Explore the source code

Explore the three folders and their content:

src it contains the source code in two files:

screen1.blk

screen.scm

Page 18: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Study the source code

screen1.blk

it is a XML file.

Page 19: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Study the source code

screen1.jsn

it is a JSON file.

Page 20: Localising an AppInventor App

LRC Summer School 2012

Evaluate different localisation strategies

Page 21: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

3. Explore localisation strategies

Modify the code in AppInventor

Modify the code in an advanced text editor (Notepad++)

Modify the code in a CAT Tool

Page 22: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

3. Explore localisation strategies

Modify the code in AppInventor

Context No Spellchecker No Translation Memory Monolingual Format

Page 23: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

3. Explore localisation strategies

Modify the code in Notepad++

Easy access No Spellchecker No Translation Memory Monolingual Format Danger of Code Damage!

Page 24: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

3. Explore localisation strategies

Modify the code in a CAT tool

Bilingual Format

Spellchecker

Translation Memory

Protected code

No context L10n Engineering – adhoc filters

Page 25: Localising an AppInventor App

LRC Summer School 2012

Extract the localisable text (filters)

Page 26: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

In the XML file, the localisable text is in the same label of other internal code. We need to internationalise the code first to protect the internal code.

-Open the Blocks Editor in AppInventor:

Page 27: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

-Introduce the token # before each translatable sentence:

Page 28: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

-Save and download again the code.

Page 29: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

-Check that the tokens are there with Notepad++

Page 30: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

-Open SDL Trados Studio 2009.

SDL Trados does not recognise our file types. We have to create special filters for them.

-Go to Tools>Options.

Page 31: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the blk file

-Create a new File Type

Page 32: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the blk file

-Add the following information:

Page 33: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the blk file

-Select the second option and browse the blk file:

Page 34: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the blk file

-Edit the element “Label” as “Always Translatable”

-Edit all the other elements as “Not Translatable”

Page 35: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the blk file

-Click on Next and Finish.

Page 36: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the scm file

-Create a new File Type

Page 37: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the scm file

-Select “Regular Expression Delimited Text”.

Page 38: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the scm file

-Add the following information:

Page 39: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the scm file

-Click on Next and Finish:

Page 40: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the scm file

-Click on “Structure patterns” in the “AppScm” Filter.

-Delete the existing pattern.

Page 41: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

4. Extract the localisable text

Filter for the scm file

-Add the following patterns:

Page 42: Localising an AppInventor App

LRC Summer School 2012

Translate

Page 43: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Create a new Project

-Add a name to your project and choose your source and target languages.

Page 44: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Add the two files (Screen1.blk & Screen1.scm).

-Remember to add the modified one with the # tokens.

Page 45: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Click on Next.

-Create a Translation Memory.

Page 46: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Click on Next, Next and Next.

-Click on Finish.

Page 47: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Click on the first file to start translating it.

Page 48: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Go to Translation>Copy All Source to Target

Page 49: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Go to View>Toolbars>Display Filter

Page 50: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Insert the # and click in “In source”

Page 51: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Translate!!!

Page 52: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Translate

CTRL + ENTER Confirm and move to next unconfirmed segment. CTRL + ALT + ENTER Confirm and move to next segment.

Page 53: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Translate the scm file.

Page 54: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

-Finalise the process.

Page 55: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

5. Translate

The final touch:

-Open the blk file with Notepad++ and click in Format>Encode in UTF-8 without BOM.

-Save the file.

Page 56: Localising an AppInventor App

LRC Summer School 2012

Merge and Compile

Page 57: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

6. Merge and Compile

-Create a backup copy.

-Place the new files in their right place.

Page 58: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

6. Merge and Compile

-Create a zip file with the three folders.

-Give it a different name.

Page 59: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

6. Merge and Compile

-Upload the localised project to AppInventor.

-Cross your fingers!

Page 60: Localising an AppInventor App

LRC Summer School 2012

Test the application

Page 61: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

6. Test the application

-Open your new project.

-Open the Blocks Editor and create a new Emulator (or in your phone).

-Test that everything works and it is in its place.

Page 62: Localising an AppInventor App

Localising an AppInventor App

LRC Summer School 2012

Aknowlegments

Special thanks to Asanka Wasala and Emilio Rodríguez Vázquez de Aldana for their help.

References:

MIT AppInventor Tutorials: http://beta.appinventor.mit.edu/learn/tutorials/index.html

Images: Helmet: http://www.flickr.com/photos/toolstop/4420180838/sizes/z/in/photostream/ Lego Rescue: http://www.flickr.com/photos/mac_filko/5490943037/sizes/z/in/photostream/ Lego Engineer: http://www.flickr.com/photos/mac_filko/5490950267/sizes/z/in/photostream/ Lego Translator: http://www.flickr.com/photos/mac_filko/5491550078/sizes/z/in/photostream/ Lego Caution: http://www.flickr.com/photos/henriquev/5415139520/sizes/z/in/photostream/

Android Logo: http://www.flickr.com/photos/incredibleguy/5979551591/lightbox/

Page 63: Localising an AppInventor App

LRC Summer School 2012

Thank you!!

[email protected][email protected][email protected]