| 1 | ==================================== |
|---|
| 2 | LinguaPlone Translation Instructions |
|---|
| 3 | ==================================== |
|---|
| 4 | |
|---|
| 5 | In the context of Department, Course, and ECObjects, translations must occur in a 'top down' |
|---|
| 6 | manner. A Department must be translated prior to translating a Course, which must be |
|---|
| 7 | translated prior to any objects in the Course being translated. |
|---|
| 8 | |
|---|
| 9 | By default, LinguaPlone will tag newly created content objects in the default language setting |
|---|
| 10 | for the instance. Objects that exist in the ZODB prior to LinguaPlone being installed will be |
|---|
| 11 | 'neutral', in terms of their language setting. In order to maintain the correct relationships |
|---|
| 12 | between languages, existing objects must have their language 'set'. |
|---|
| 13 | |
|---|
| 14 | To set an existing object's language, click translate into on the management toolbar, and then |
|---|
| 15 | click manage translations.... This interface will allow you to change the content language |
|---|
| 16 | setting from neutral to the appropriate setting for your instance. |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | ======================================== |
|---|
| 20 | Localization with eduCommons 3.2.1 |
|---|
| 21 | ======================================== |
|---|
| 22 | |
|---|
| 23 | Overview |
|---|
| 24 | -------- |
|---|
| 25 | If you want to translate eduCommons into your language, here are instructions on how to get |
|---|
| 26 | started, as well as some guidelines that you should follow when performing a translation. You do |
|---|
| 27 | not need to know anything about programming to create an eduCommons translation. This |
|---|
| 28 | has been adapted for eduCommons from the `plone translator guidelines |
|---|
| 29 | <http://plone.org/development/teams/i18n/translators-guidelines>`__. Please see our `eduCommons |
|---|
| 30 | Localization Team page <./educommons-localization-team>`__ for a list of our volunteer translators. |
|---|
| 31 | |
|---|
| 32 | Introduction |
|---|
| 33 | ------------ |
|---|
| 34 | Since eduCommons is customized from Plone, it has built-in support for internationalization. As of |
|---|
| 35 | June 2006 Plone has 56 different translations. eduCommons requires some additional |
|---|
| 36 | translation work, but follows the same process as Plone. Adding an eduCommons translation is much |
|---|
| 37 | less time consuming because most of the translation work has already been done in Plone. |
|---|
| 38 | |
|---|
| 39 | There are about 400 strings needed for a translation of eduCommons (compared to about 1600 strings |
|---|
| 40 | for a Plone translation). Some of these are sentences or paragraphs, but the major part are one or |
|---|
| 41 | two words. These strings are scattered around in Plone, for example in page templates. Other items |
|---|
| 42 | to translate are widget labels, and workflow states. All those strings are collected in master |
|---|
| 43 | files. Currently eduCommons contains six .pot files. Each language requires its own .po files that |
|---|
| 44 | corresponds to the strings or message ids declared in the .pot files. The .pot is the blueprint for |
|---|
| 45 | the .po files. |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | Tools |
|---|
| 49 | ----- |
|---|
| 50 | When creating the .po files, we strongly recommend using a specialized tool called poEdit |
|---|
| 51 | (http://www.poedit.net). This makes the translation process very easy. But a normal |
|---|
| 52 | text editor work fine if you prefer that (both vim and emacs are great for this, and have special |
|---|
| 53 | modes for PO files). poEdit exists for both Linux and Windows, and Mac OS X. |
|---|
| 54 | |
|---|
| 55 | If you use a plain text editor instead of a dedicated tool, you should make sure you use utf-8 |
|---|
| 56 | as your charset, even if your country usually uses iso-8859-* or similar. The reason for this is |
|---|
| 57 | that Plone uses a few characters (like the ellipsis) that don't have representations in other |
|---|
| 58 | charsets. |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | Step-by-step guide |
|---|
| 62 | ------------------ |
|---|
| 63 | 1. Check if somebody is working on your language already. Even if they do, contact them and |
|---|
| 64 | offer to help with testing. There's no way the eduCommons team can know what is a high-quality |
|---|
| 65 | translation in a language they don't know, so your input is very valuable to us. We want |
|---|
| 66 | good translations, not just a translation. So if you think something is badly done, tell us. |
|---|
| 67 | Give polite feedback if something feels wrong with the translation to your language. A |
|---|
| 68 | translation can always be made better. |
|---|
| 69 | |
|---|
| 70 | 2. Be sure that you have used eduCommons enough to grasp the general concepts and how they |
|---|
| 71 | interact. eduCommons is an advanced system, so be sure you know enough before you start |
|---|
| 72 | translating key concepts like workflow. Check the language specific terms for your language, |
|---|
| 73 | or create one if it doesn't exist. This will help you keep consistent translations for your |
|---|
| 74 | language. |
|---|
| 75 | |
|---|
| 76 | 3. Download the files to base your translation on. We recommend that you always use the |
|---|
| 77 | English language files as your starting point, both because they are always the most current |
|---|
| 78 | ones (other translations will usually lag a bit behind), and because you should try to match |
|---|
| 79 | the original text. Translating between similar languages may be tempting (like Danish and |
|---|
| 80 | Norwegian), but will usually result in a lower quality translation. Of course, if the only |
|---|
| 81 | language you understand is Italian, and you want to provide a Chinese translation, we prefer |
|---|
| 82 | this translation compared to not getting one at all :) |
|---|
| 83 | |
|---|
| 84 | 4. Here is a link to the most recent translation files available for eduCommons (plone.po and |
|---|
| 85 | eduCommons.po). Remember, unless there is already an existing translation available, you need |
|---|
| 86 | to grab the .pot files. |
|---|
| 87 | |
|---|
| 88 | http://cosl.usu.edu/svndev/eduCommons3/trunk/i18n/ |
|---|
| 89 | |
|---|
| 90 | Here are links to the latest translations for each of the eduCommons products on the Plone |
|---|
| 91 | Collective site (these links may change, so check back for the most accurate information): |
|---|
| 92 | |
|---|
| 93 | http://svn.plone.org/svn/collective/ZipFileTransport/branches/cosl-plone3/i18n/ |
|---|
| 94 | |
|---|
| 95 | http://svn.plone.org/svn/collective/IMSTransport/branches/cosl-plone3/i18n/ |
|---|
| 96 | |
|---|
| 97 | http://svn.plone.org/svn/collective/ContentLicensing/branches/cosl-plone3/i18n/ |
|---|
| 98 | |
|---|
| 99 | http://svn.plone.org/svn/collective/PloneBookmarklets/branches/plone3/i18n/ |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | 5. Open poEdit or your editor of choice and load the first of the master files. In poEdit |
|---|
| 103 | select File --> Open (for existing .po translation files) or File --> New catalog from POT file. |
|---|
| 104 | (to create a new translation from a .pot file). Be sure to set the language and language code in |
|---|
| 105 | Catalog --> Settings. With poEdit or other editors you will need to save your new translation files |
|---|
| 106 | as <product>-<language-code>.po (e.g. for a French translation: plone-fr.po, eduCommons-fr.po, etc). |
|---|
| 107 | Have a look at http://www.i18nguy.com for the correct language code. |
|---|
| 108 | |
|---|
| 109 | 6. In poEdit, the first line shows the exact string that you have to translate. Your translation is |
|---|
| 110 | entered in the area below the original string. It's easy. This is why we recommend poEdit. |
|---|
| 111 | |
|---|
| 112 | 7. In other text editors things will look a little different. An example section can look like this: |
|---|
| 113 | |
|---|
| 114 | | #. Default: "Export" |
|---|
| 115 | | #: ../skins/eduCommons/Export_form.cpt |
|---|
| 116 | | msgid "Export" |
|---|
| 117 | | msgstr "" |
|---|
| 118 | | |
|---|
| 119 | |
|---|
| 120 | The first line (marked with Default) shows the exact string that you have to translate. |
|---|
| 121 | Message attributes in the form ${foo} have to be included in the translated string exactly |
|---|
| 122 | as they are. These are variables that will be filled in the rendering process. Do not touch |
|---|
| 123 | this. |
|---|
| 124 | |
|---|
| 125 | The next lines (marked with :) list which templates inside eduCommons use this string. There |
|---|
| 126 | might be several templates re-using the same string, but it is normally in the same context. |
|---|
| 127 | Do not touch this. |
|---|
| 128 | |
|---|
| 129 | The next to last line (starting with msgid) holds the unique identifier for the string. Do |
|---|
| 130 | not touch this. |
|---|
| 131 | |
|---|
| 132 | Finally, the last line is where your job starts. Enter the text in your language, be careful |
|---|
| 133 | to keep the same casing (where appropriate, some languages have different rules that should |
|---|
| 134 | be applied). |
|---|
| 135 | |
|---|
| 136 | 8. If there is programming code in a string, only translate the string, not the code. For example in, |
|---|
| 137 | Default: "${number} items matching your criteria." you would only translate "items matching your |
|---|
| 138 | criteria." The code in the first part should be left as it is, so the translation will look like this: |
|---|
| 139 | ${number} TRANSLATION. |
|---|
| 140 | |
|---|
| 141 | 9. Keep translating (but take breaks, this isn't done in one sitting - it's repetetive (but |
|---|
| 142 | rewarding) work. After you have translated all of plone.pot, you should start on eduCommons.pot. |
|---|
| 143 | Don't worry, you have already completed the biggest part. |
|---|
| 144 | |
|---|
| 145 | 10. If you can, test your files. Get other people from your own country to test. This means having other |
|---|
| 146 | people check your file and putting your file in an eduCommons test instance, browsing it in |
|---|
| 147 | your language. |
|---|
| 148 | |
|---|
| 149 | 11. If you are unsure about the best translation of a message, you can set it to fuzzy, so |
|---|
| 150 | others can look at these. Setting a message to fuzzy means adding a "#, fuzzy"-line directly |
|---|
| 151 | above the line starting with msgid (poEdit has a button for this). |
|---|
| 152 | |
|---|
| 153 | 12. Since some of the translation files are hosted on the Plone Collective, if you know how SVN |
|---|
| 154 | works, you can get an account with Plone (Here's how to request write access to the Collective.) |
|---|
| 155 | and maintain the files in SVN yourself (see next section). If not, no problem, just e-mail your |
|---|
| 156 | translation to us at eduCommons [at] cosl [dot] usu [dot] edu, and we will add it for you and put it into the |
|---|
| 157 | eduCommons distribution in the next release. We will also add you to our our `eduCommons |
|---|
| 158 | Localization Team page. <./educommons-localization-team>`__ |
|---|
| 159 | |
|---|
| 160 | 13. Please check on your translations periodically to keep them updated as new versions are |
|---|
| 161 | released. A quick find for "" will reveal any new or missing stings that need to be translated. |
|---|
| 162 | |
|---|
| 163 | 14. If you have other questions or about contributing a translation to eduCommons please contact |
|---|
| 164 | us at educommons [at] cosl [dot] usu [dot] edu. Thank you for you help! |
|---|
| 165 | |
|---|