Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#5546 closed enhancement (fixed)

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:
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: no

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 (2)

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

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by korakurider

comment:1 Changed 7 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

comment:2 Changed 7 years ago by jg

  • Milestone changed from Never Assigned to FutureFeatures

comment:3 Changed 7 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

comment:4 Changed 7 years ago by korakurider

Oops invalid correction sorry.
Correction again

etoys --document proj.pr \

MO_PATH $SUGAR_BUNDLE_PATH/locale $args

Changed 7 years ago by korakurider

comment:5 Changed 7 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.

comment:6 Changed 7 years ago by bert

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in Etoys-75.

comment:7 Changed 6 years ago by gregorio

  • Milestone FutureFeatures deleted

Milestone FutureFeatures deleted

Note: See TracTickets for help on using tickets.