1

When the shell script written by sneetsher run, How can I make a mini English-Chinese dictionary for Ubuntu?

i found that no all english words translated into chinese,it is clear that all the words not translated can be translated into chinease,why not all the words be translated ? All the words is simple, not difficult to translate.

enter image description here

showkey
  • 342
  • Are you looking to help in Ubuntu translation? – user.dz Sep 19 '15 at 10:05
  • I almost forget to answer why, so I updated my answer. I used to translate before to Arabic any thing I see in launchpad. Later, I figured out that it 's better for me to stick with my patient. I like electronics, so I started translating only those related to it or physics. – user.dz Sep 20 '15 at 11:46

1 Answers1

0
  • I will just mention the glue here, Software translation (L10n, I18n or G11n) is too board topic. The directories files queried by the script are mainly from desktop environment packages (LXDE has its own, same as KDE, Gnome). Unity is a particular case, it is not using any.

  • LXDE is build on GTK. So it's using gettext format .po for translations. But this format is not used for .desktop files neither Launchpad support their translation on its web interface. So you have to change the source directly or tell some to do so by submitting a patch.

  • LXDE is not a Ubuntu project, it is a independent project. So on Launchpad is not the upstream project site. Each project have is own procedures/rules.

    http://lxde.org/ → Join Us → Translate LXDE and the projects documentation


How To get the related Upstream Project?

I'm using Kubuntu 15.04 and all its directory files are translated, only some belongs to WineHq.

  1. Change my previous script to show file path

    #!/bin/bash 
    
    for f in $(ls $1)
    do
            name_en=`sed -n -e '0,/Name/{s/^\s*Name\s*=\s*//p}' $f`
            name_zh=`sed -n -e '0,/Name\[zh_CN\]/{s/^\s*Name\[zh_CN\]\s*=\s*//p}' $f`
    
            case `echo ${#name_en}/8 | bc` in
            3|2)    echo -e $name_en'\t'$name_zh'\t'$f
                    ;;
            1)      echo -e $name_en'\t\t'$name_zh'\t'$f
                    ;;
            0)      echo -e $name_en'\t\t\t'$name_zh'\t'$f
                    ;;
            esac
    done
    
  2. Run

    ./extract_zh_translation.sh "/usr/share/desktop-directories/*.directory"
    
  3. Check related package that desktop comes from

    dpkg -S /usr/share/desktop-directories/wine-Programs-Accessories.directory
    

    Output:

    wine1.6: /usr/share/desktop-directories/wine-Programs-Accessories.directory
    
  4. Search for it (wine1.6) on http://packages.ubuntu.com

  5. On the side panel, see all package info, most important Launchpad page and Upstream project site (External resources: homepage)

I almost forgot to answer, Why?

Human Resources!!! These belong to Free Communities, even if some these communities have a company or more in the core that will keep this community maintained and helps resolve some development problems which are hard to resolve by free community or only few developer have interest for.

The translation is better/easier when it is made by a native speaker who have a minimum technical knowledge to test the software he is translating.

Causes are too broad here, So go ahead and make some translation, let's say for one year may or more. Then if you remember this, come & write an answer.

Talk is cheap. Show me the code.

Linus, http://lkml.org/lkml/2000/8/25/132

My advise, try plan maintaining the translation for few softwares/tools you like them much for some years. It better then translating plenty of them for few months then you get over whelmed then you stop.

Maintaining, I mean the translation need review before each release, update old entries & add the new ones.

BTW, check this https://wiki.ubuntu.com/Translations to learn about Ubuntu translation process.

user.dz
  • 48,105