Opened 8 years ago

Last modified 7 months ago

#3799 needs_review task

Investigate methods for translating strings in Unixoid shell scripts

Reported by: rransom Owned by: traumschule
Priority: Medium Milestone:
Component: Community/Translations Version:
Severity: Normal Keywords:
Cc: erinn, emmapeel, tbb-team Actual Points:
Parent ID: Points:
Reviewer: emmapeel Sponsor:

Description

Once the fix for #2824 is merged, Tor Browser Bundle for Linux will be able to display error messages to non-technical users. Someday, we may need to have these error messages translated.

We need a solution that is either (a) pre-installed on Debian Squeeze with the default X Window System setup and installed on FreeBSD systems with GNOME or KDE installed, or (b) small enough to ship in the TBB for Linux tarball. Perl and Python programs are currently not acceptable unless they are very likely to be pre-installed on users' systems.

Child Tickets

Change History (20)

comment:1 Changed 8 years ago by rransom

If we don't find a clearly suitable tool for this purpose, we can write one fairly easily, so this doesn't have to be a thorough search.

comment:2 Changed 8 years ago by rransom

Type: defecttask

comment:3 Changed 8 years ago by erinn

Robert,

Since you're focusing on the Linux launch script, maybe you can port RelativeLink.c to Linux instead? Then we could potentially, long-term, have the same strings for all platforms as well as the same launching binary and interface. (OSX still uses the shell script too, but I think this is problematic.)

comment:4 in reply to:  3 Changed 8 years ago by rransom

Replying to erinn:

Since you're focusing on the Linux launch script, maybe you can port RelativeLink.c to Linux instead? Then we could potentially, long-term, have the same strings for all platforms as well as the same launching binary and interface. (OSX still uses the shell script too, but I think this is problematic.)

The launchers on Windows, Linux, and Mac are too different to merge into a single program, and we should be able to use the same strings on all platforms without merging the launcher programs themselves.

comment:5 in reply to:  1 Changed 8 years ago by runa

Owner: changed from Runa to rransom
Status: newassigned

Replying to rransom:

If we don't find a clearly suitable tool for this purpose, we can write one fairly easily, so this doesn't have to be a thorough search.

I'm not really sure what kind of solution you want for the TBB error messages, but once you find one I'll figure out a way to get strings translated, put the project on Transifex etc.

comment:6 Changed 8 years ago by rransom

The hard problem here is converting messages to the user's current character encoding. We could use iconv to convert messages' encodings; it's standard on Linux, and can be installed on FreeBSD from the ports system.

comment:7 Changed 3 years ago by isabela

Component: User Experience/TranslationsCommunity/Translations

comment:8 Changed 19 months ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

comment:9 Changed 11 months ago by emmapeel

ping rransom

did you look onto gettext utilities? They are pretty straightforward to generate translation files in Linux and are currently used on many of our projects.

Or maybe this ticket should be closed?

Please let me know if I can help you getting started with this

comment:10 Changed 11 months ago by arma

Ok, I spent a while trying to figure out what this ticket was for, and here is what I think the summary is:

On Linux when you launch tor browser from the command line (./start-tor-browser.desktop) you might get one of several error messages:

    echo "$complain_dialog_title must be run within the X Window System." >&2
    echo "$complain_dialog_title should be started as './start-tor-browser'"
        complain "The Tor Browser Bundle should not be run as root.  Exiting."
        complain "Tor Browser requires a CPU with SSE2 support.  Exiting."
                        complain "start-tor-browser cannot be run using a symlink on this operating system."
   complain "Wrong architecture? 32-bit vs. 64-bit."
        complain "There seems to have been a quoting problem with your \
TOR_CONTROL_PASSWD environment variable."

and if the user installed e.g. the French version of Tor Browser, they will still get these messages in English.

And some of them, like the 32-bit vs 64-bit arch check, are aiming for actual end users who screw up and download the wrong arch of tor browser.

comment:11 Changed 11 months ago by arma

Owner: rransom deleted

comment:12 Changed 11 months ago by arma

Status: assignednew

I'm unassigning rransom here since he isn't still working on this ticket.

Emma, now that you have context I'll let you decide what you think should be done with this idea. :)

comment:13 Changed 10 months ago by traumschule

If you think this is a good idea, feel free to assign me: How to add localization support to your bash scripts

comment:14 Changed 10 months ago by emmapeel

Cc: emmapeel added
Owner: set to traumschule
Status: newassigned

It would be great if you can help on this, traumschule.

All user facing strings should be localized.

I am not sure about how to go in the code, though, maybe there are some rules etc.

I add tbb-team here in cc in case they have a say on the way to go.

Also, if this is part of the TB, it would be great to have this new sentences added to an already existing translation file, if possible. But this is not a blocker.

Last edited 10 months ago by emmapeel (previous) (diff)

comment:15 Changed 10 months ago by emmapeel

Cc: tbb-team added

comment:16 Changed 10 months ago by traumschule

Status: assignedneeds_review

gave it a try: https://github.com/traumschule/torbrowser-localized

test: LANGUAGE=de_DE ./Browser/start-tor-browser

let me know if it breaks anything!

comment:17 Changed 10 months ago by traumschule

Reviewer: emmapeel

still needs a live test, but are strings are ready for translation

comment:18 Changed 7 months ago by emmapeel

so, i was looking at the strings and there are many incomplete strings.

I mean, the po file presents them in an incomplete form and they get concatenated afterwards. i.e. https://github.com/traumschule/torbrowser-localized/blob/master/locale/de/start-tor-browser.po#L69

This may not work in many languages.

Can't you try something that will generate whole sentences, even with some little placeholders?

Also, can you make a pull request so I see the differences neatly on github and I can review more easily? :D thanks!

comment:19 Changed 7 months ago by emmapeel

Status: needs_reviewassigned
Note: See TracTickets for help on using tickets.