"Fossies" - the Fresh Open Source Software Archive

Member "fet-5.41.0/doc/adding-new-translations/adding-new-translations.txt" (24 Jul 2018, 9008 Bytes) of package /linux/privat/fet-5.41.0.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "adding-new-translations.txt" see the Fossies "Dox" file reference documentation.

    1 FET - How to add new translations (languages):
    2 
    3 VERY IMPORTANT: Please announce your intention if you want to translate FET into your language.
    4 Another person might work on the same translation as you and time might be wasted.
    5 
    6 VERY IMPORTANT: Please follow the English words and do not translate incompletely
    7 a field. Either translate it or not, but not partially.
    8 
    9 
   10 Please read the instructions below very carefully and follow them:
   11 
   12 STEP 1: You can use the fet_untranslated.ts file, just rename it
   13 fet_**.ts (** means your language).
   14 
   15 (alternative procedure:
   16 Modify the file "fet-v.v.v/src/src.pro", by adding a line
   17 in the TRANSLATIONS section for your language (for instance, adding
   18 a backslash after the last translation and then "../translations/fet_it.ts" for Italian).
   19 Enter the directory "fet-v.v.v/src/" and type "lupdate src.pro".
   20 This will create the needed file, named "fet-v.v.v/translations/fet_**.ts").
   21 It is highly advisable to disable number heuristic, as it is not very good to FET translations
   22 (run "lupdate src.pro -disable-heuristic number"). Number heuristic comes up with weird looking translations
   23 for some fields, like "Weight 100.0% {100%}".
   24 
   25 STEP 2.
   26 
   27 Open the file "fet-v.v.v/translations/fet_**.ts" (for example, fet_it.ts)
   28 with the Qt Linguist and edit it, then save it.
   29 
   30 You do not have to translate all the fields. Just leave the corresponding fields marked as unfinished (untranslated).
   31 
   32 There are some comments in the translation file, they are not to be translated, they just help you.
   33 You can see that for instance in the "FET XML files" field.
   34 
   35 Please translate the FetMainForm_template section firstly. This is the main form (the menu and the shortcuts).
   36 Please double check the translation of the main menu practically from FET (see below how to check your translation
   37 in FET, by renaming it as an already existing translation). The main form is very important and there should be
   38 no mistakes here, especially in the constraints description.
   39 Send the file with the completely translated FetMainForm_template section to the FET authors. It may take a
   40 long time for you to translate all the fields in FET, but if you translate only the main form it takes usually
   41 a short time and your partial translation will be added to official FET, helping other users until the complete
   42 translation will be ready.
   43 
   44 STEP 3.
   45 
   46 From Qt Linguist, release the translation as "fet-v.v.v/translations/fet_**.qm"
   47 (for instance, fet_it.qm).
   48 
   49 STEP 4.
   50 
   51 Send all the three modified files to the FET authors (the important file is fet_**.ts, you may omit the others).
   52 The first time you send your file(s), please also send the name of your language, written in your language
   53 (for instance, for the Romanian translation this name is: Română).
   54 
   55 
   56 Of course, anyone can redo/improve current translations. The best variants will be chosen.
   57 
   58 
   59 Some other details follow:
   60 
   61 First of all, you need a version of Qt Linguist.
   62 
   63 Qt homepage: http://www.qt.io/
   64 
   65 For GNU/Linux it is available if you type "linguist" (this is part of Qt development tools).
   66 For Windows, you will have to download the latest Qt from the Qt homepage.
   67 For Mac OS X, maybe you have Qt linguist precompiled available for download from your package manager,
   68 or you can download the latest Qt from the Qt homepage.
   69 
   70 fet_**.ts: You will have to open this file using Qt
   71 Linguist. The most useful keys are: Ctrl+Enter (activates current translation
   72 and jumps to the next untranslated phrase),Ctrl+1, Ctrl+2 (first or second
   73 suggestion). You can skip the large fields, like the FAQ and others. You can
   74 skip also fields you cannot translate, they will remain in English. But let them
   75 marked as untranslated (do NOT press Ctrl+Enter on an unfinished/untranslated field,
   76 skip it with the mouse or Ctrl+J)
   77 
   78 Important note: please translate, in FetMainForm_template, the field "Language" both in your language
   79 and in English, separated by a slash (like: Limba/Language). The reason is that people may become
   80 stuck with another language.
   81 
   82 Important: please take care of difference between activity and activities,
   83 teacher and teachers, students and students set, room and rooms, time (day+hour) and hour (alone). These
   84 are very important differences in constraints.
   85 
   86 Please try to keep the length of large fields (the ones relating to constraints) in FetMainForm_template
   87 to a minimum, otherwise they will look too big. This is the main menu.
   88 This way, the main menu will look good in your language
   89 (please check the main menu of FET with your translation).
   90 Also, in the FetMainForm_template there appear some terms like: &Help. This means that Help has
   91 as accelerator the letter H. You can translate in your language like: &Ajutor, preferably take care of this:
   92 in the same menu (like File menu) there should be unique accelerators.
   93 
   94 Please try to follow the original (English) line arrangement. That is, if you
   95 meet: "Current activity's<new line symbol>
   96      description"
   97 you have to split your message if it is too wide (wider than the widest line).
   98 For instance, the translation would be:
   99      "Descrierea activitatii<new line symbol>
  100      curente"
  101 
  102 New line symbol is a special sign in Linguist, you'll see it, it is like Greek symbol for Pi.
  103 Also, in linguist there is a special character (a dot) for a space.
  104 
  105 New line means you need to put a new line character (press Enter).
  106 
  107 Please take care to punctuation, because Linguist requires it. You have to end
  108 each translation with the same punctuation mark as the English one. For
  109 instance:
  110      "Compulsory conflicts:"
  111 would become:
  112      "Conflicte obligatorii:"
  113 If you don't do that, you will get an exclamation mark for this translation.
  114 
  115 Please translate a field preferably word-by-word as in English, and if you
  116 translate a field, translate it completely.
  117 
  118 It would be a good idea to send the fet_**.ts file after only a few
  119 modifications, so that the FET authors can check it if it works, so your work
  120 is not wasted. If that goes well, you can continue working on it.
  121 
  122 If you do not want your email address to be listed in the TRANSLATORS section, please specify that,
  123 and maybe provide another method of contacting you.
  124 
  125 In order to test your translation you need to release it as fet_**.qm
  126 and put it into the directory "translations/". Then, rename the file as
  127 fet_ro.qm (or any other implemented translation), overwriting the old one, and try the Romanian language.
  128 
  129 Note: Arabic, Farsi and Hebrew are written right-to-left. If you want to test a usual left-to-right translation,
  130 rename it differently from fet_ar.qm, fet_fa.qm or fet_he.qm. If you want to test a right-to-left translation,
  131 rename it as fet_ar.qm, fet_fa.qm or fet_he.qm.
  132 
  133 Note: to add your translation into FET, without renaming it as an already existing language, you need to change
  134 these files/functions:
  135 - void usage(QTextStream* out, const QString& error) in the file src/interface/fet.cpp
  136 - void initLanguagesSet() in the file src/interface/fet.cpp
  137 - void FetMainForm::populateLanguagesMap(QMap<QString, QString>& languagesMap) in the file src/interface/fetmainform.cpp
  138 - the TRANSLATIONS section of the file src/src.pro (add your language, similar to the other languages. Please see
  139 also the alternative procedure for STEP 1).
  140 Then recompile. But this is complicated and unneeded.
  141 
  142 Note: under Mac OS X, to test your translation, you need to put it into the directory /usr/share/fet/translations/
  143 or fet.app/Contents/MaxOS/translations/ (information provided by a translator).
  144 More notes for the Mac OS X platform, from a user: copying the translation file fet_**.qm into the directory fet.app/Contents/MacOS/translations
  145 is possible from the command line in X11 xterm (but it is not possible with the finder program, because the file extension ".app" is
  146 exclusive for applications, so the program finder interprets a directory with the extension ".app" as an application).
  147 
  148 Please test your translation on the file named test-all-constraints.fet in the directory translations. Check the
  149 all time constraints and all space constraints dialogs, the constraints should look good (description and detailed description for each one).
  150 Also, the constraints should be different, like for instance starting times from time slots or same starting time from same starting hour.
  151 
  152 There are some variables written with uppercase letters, like: MAX_TOTAL_SUBGROUPS.
  153 These names must remain unchanged.
  154 
  155 
  156 Tips and tricks:
  157 
  158 There are many small fields which are repeated many times, in different contexts (sections). If you translated such a field at least once,
  159 running lupdate will automatically fill the other identical fields (using the 'same text' heuristic), so you will only need to check
  160 these fields and mark them as finished (if the field has a specific disambiguation/comment, check that it corresponds). These fields will
  161 be marked as translated, but unfinished (probably with a yellow question mark). Remember to disable 'number heuristic':
  162 "lupdate src.pro -disable-heuristic number", as recommended above.