Ticket #5546 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 years ago

etoys-based activity bundle to have private MO

Reported by: korakurider Owned by: etoys
Priority: normal Milestone:
Component: etoys-activity Version: Development build as of this date
Keywords: Cc:
Action Needed: Verified: no
Deployments affected: Blocked By:
Blocking:

Description

Currently all MOs need to be installed in lang directory under /usr/share/etoys, and Squeak will look up MOs there. But some etoys-based activity might have its own translations. Those MOs should be located under directory of the activity, so search path for MO should be able to specified by startup parameter of etoys.

Attachments

moPath-KR.cs (3.9 kB) - added by korakurider 6 years ago.
DiceWars-2.xo (45.8 kB) - added by korakurider 6 years ago.

Change History

Changed 6 years ago by korakurider

Changed 6 years ago by korakurider

I attached proposed patch. With this each activity bundle can provide private translation in its directory tree. e.g.

etoys -document proj.pr \

MO_PATH $SUGAR_ACTIVITY_ROOT/lang \ $args

Note that in this case MO has to be under:

$SUGAR_ACTIVITY_ROOT/lang/<lang_code>/LC_MESSAGES

Changed 6 years ago by jg

  • milestone changed from Never Assigned to FutureFeatures

Changed 6 years ago by korakurider

Correction to last my comment: directory naming should comply to the convention on this platform. so:

Note that in this case MO has to be under: $SUGAR_ACTIVITY_ROOT/lang/<lang_code>/LC_MESSAGES

This should be

$SUGAR_ACTIVITY_ROOT/locale/<lang_code>LC_MESSAGES

etoys -document proj.pr \ MO_PATH $SUGAR_ACTIVITY_ROOT/lang \ $args

This should be

etoys --document proj.pr \

MO_PATH $SUGAR_ACTIVITY_ROOT/locale $args

Changed 6 years ago by korakurider

Oops invalid correction sorry. Correction again

etoys --document proj.pr \

MO_PATH $SUGAR_BUNDLE_PATH/locale $args

Changed 6 years ago by korakurider

Changed 6 years ago by korakurider

As a test case, I revised DiceWars bundle for "new sugar" (after ship2 with rainbow) and added Japanese translation.

How to test:

1) prepare etoys.image

-- apply proposed patch moPath-KR.cs

-- to workaround #5647, preload Japanese font

-- save image

2) install DiceWars-2.xo

3) check the activity run, ballon help is shown in English.

4) test if translation is working for Japanese

-- switch language to Japanese with sugar-control-panel (or edit /home/olpc/.i18n manually), then restart sugar

-- start DiceWars

-- check balloon help is translated

Note that you can add more language by just adding mo to bundle.

Changed 6 years ago by bert

  • status changed from new to closed
  • resolution set to fixed

Fixed in Etoys-75.

Changed 6 years ago by gregorio

  • milestone deleted

Milestone FutureFeatures deleted

Note: See TracTickets for help on using tickets.