2 more ideas to help translation

2 more ideas to help translation

by Jurgis Pralgauskis -
Number of replies: 3

I am still thinking, how to make it easier to figure out what You are translating and also, what You want to translate first of all (probably this idea was not in a right time, as it was closed smile).

  • make some "translation" mode (or just temp hack) in witch You woud see where appropriate strings are visible - just add some metainfo "{module}.{string_name}" :
    • may be make spans with metainfo with titles (it shows up as tips, when mouse isover the phtrase).
    • or just attached strings to the phrases like:
      $string['cnfallowdupentries']  = "Allow duplicated entries"; --> "glossary.cnfallowdupentries: Allow duplicated entries";
  • use separate glossary-activity to explain meaning of specific words/phrases:
    • in explanation it would be nice to include rel path to the situation, when the phrase shows up
    • a snapshot of the window/area, where it is (may be with some explanation
  • or use wiki

because translators not always have time to experiment everything themselves

Average of ratings: -
In reply to Jurgis Pralgauskis

hack to track the translation string

by Jurgis Pralgauskis -
I wrapped get_string @ moodlelib.php
to show_up string $identifier alongside with translations:

after the line #1912:
function get_string($identifier, $module="", $a=NULL) {
--insert--:
// a hack to help translations, by dz0 2004 10 21
$resultstring = get_string2($identifier, $module, $a);
$CFG->translationmode = 2; // You can choose smile
switch ($CFG->translationmode){
case 1: $resultstring = "<span class=\"translation\">{$module}:{$identifier}::</span>".$resultstring;break;
case 2: $resultstring = "{$module}:{$identifier}::".$resultstring; break;
}
return $resultstring;
}

function get_string2($identifier, $module="", $a=NULL) {
option 1 has problems, when the translatable string appears inside some tag
<tag <span> no good </span> >, but it helps to toggle dislpayibility of identifiers, as I found it explained at Mambosphere today smile
Attachment translation_keywords_hack.gif
In reply to Jurgis Pralgauskis

Re: hack to track the translation string

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators

This is realy a nice hack since it solves some problems:

  • where is the string for this item
  • how is it translated
  • What was the original word here?
  • checking and impoving the translation is easyer, since you have the link between filename, english and translated string

"Give them a finger and they take an arm"

  • can someone incorporate this with a button in the language menu?
  • can the translated field be a filled in (or empty) box, so you can edit the the language directly from the page? (this would encourage translators for new languages becouse it's easyer and you have quicker a result)

Thanks a lot for bringing this in the community

In reply to Jurgis Pralgauskis

Re: 2 more ideas to help translation

by Jurgis Pralgauskis -

hi, I try to make something, which helps to work on translations several people at a time (via web interface, as it is easier for simple person than cvs):

help and documentation

http://tadas.hn.org/~jurgis/moodle/help

it's based on CMSimple , whitch uses one html for all content

so I generated http://tadas.hn.org/~jurgis/moodle/help/all.php - it is also useful, whe You give the stuff to be checked to somebody who is good at translations but does'n like sitting near computer much.

Then I can edit it , just login with pwd "moodle" smile)

I edit just my language of course, and You must not delete tables

then I made a script, whitch (parses a the big file) and puts my edited text back to appropriate files

then You can download all files in archive http://tadas.hn.org/~jurgis/moodle/dlzip.php

Interface

http://tadas.hn.org/~jurgis/moodle/interface/lang.php
probably because of slow server You have to wait a minute while it loads.

it's a dirty hack of /admin/lang.php but it has some features:
if you don't know how exactly to translatea word,, just separate alternatives wiht slashes "/", and an extra field will appear, once You save. This extra field is for keeping alternatives close to translation. And now you can leave just one (to Your view best) alternative in original field. Fields with alternatives (slashes ;)) have violet borders,
and fields with "??" (which means you are not sure) are bordered red.