Localisation
Lokalisering är i allmänhet den process som ger användargränssnittet i ett program flera språk. I FreeCAD så kan du ställa in användargränssnittets språk under Redigera?Alternativ?Allmänt. FreeCAD använder [Qt] för att aktivera flerspråkssupport. På Unix/Linux system så använder FreeCAD som standard de gällande locale-inställningarna för systemet.
Hjälpa till med att översätta FreeCAD
En av de mycket viktiga saker du kan göra för FreeCAD, om du inte är en programmerare, är att hjälpa till att översätta programmet till ditt språk. Det är nu lättare än någonsin att göra det då vi nu använder oss av Crowdin online översättningssystemet där man kan samarbeta med flera personer
Hur man översätter
- Gå till FreeCADs projektsida för översättning på Crowdin;
- Logga in genom att skapa en ny profil, eller genom att använda ett tredjepartskonto som t.ex din Gmail adress;
- Klicka på det språk som du vill översätta;
- Börja översätt genom att klicka på Translate knappen intill en av filerna. FreeCAD.ts innehåller till exempel textsträngarna för FreeCADs huvudgränssnitt.
- Du kan rösta på existerande översättningar, eller så kan du skapa dina egna.
Notera: Om du deltar aktivt i översättningen av FreeCAD och vill bli informerad innan nästa utgåva är klar att släppas, so du får tid att granska din översättning, så prenumerera på denna punkt: http://www.freecadweb.org/tracker/view.php?id=137
Förbereda dina egna moduler/applikationer för översättning
All of the above steps are performed by the "translation scripts" which are run by an administrator periodically.
Preparing your module for translation is quite easy. First, you need to ensure that you have a "translations" directory in myModule/Gui/Resources. Then open a terminal window (or Windows/OSX equivalent) in your "translations" directory and enter the following command:
lupdate -ts myModule.ts
This creates an empty translation file. Once this is done, you need to ensure that the translation scripts are updated as in this pull request.
Everything after this is automatic as far as a developer is concerned. The administrator will extract the text strings, the translators will translate them, then the administrator will extract the translations and update FreeCAD/master.
Förkrav
Automating Translation Updates
Currently FreeCAD uses the Crowdin API via Crowdin Scripts to pull and push translations in to Crowdin and back in to the Github repo.
Older module translation techniques
Localization Older Methods describes the use of translation tools such as Qt Linguist, lupdate, lrelease, pylupdate4, etc in detail. Most of this is no longer required for FreeCAD/master modules, but may be helpful preparing and updating 3rd party modules.
Översätta wikin
This wiki is hosting a lot of contents, the majority of which build up the manual. You can browse the documentation starting from the Main Page, or have a look at the User's manual Online Help Toc.
Translation plugin
When the Wiki moved away from SourceForge, Yorik installed a Translation plugin which allows to ease translations between pages. For example, the page title can now be translated. Other advantages of the Translation plugin are that it keeps track of translations, notifies if the original page has been updated, and maintains translations in sync with the original English page.
The tool is documented in Extension:Translate, and is part of a Language Extension Bundle.
To quickly get started on preparing a page for translation and activating the plugin, please read the Page translation example.
To see an example of how the Translation tool works once the translation plugin is activated on a page, you can visit the Main Page. You will see a new language menu bar at the bottom. It is automatically generated. Click for instance on the German link, it will get you to Main Page/de. Right under the title, you can read "This page is a translated version of a page Main Page and the translation is xx% complete." (xx being the actual percentage of translation). Click on the "translated version" link to start translation, or to update or correct the existing translation.
You will notice that you cannot directly edit a page anymore once it's been marked as a translation. You have to go through the translation utility.
When adding new content, the English page should be created first, then translated into another language. If someone wants to change/add content in a page, he should do the English one first.
It is recommended to have basic knowledge of wiki style formatting and general guidelines of the FreeCAD wiki, because you will have to deal with some tags while translating. You can find this information on WikiPages.
The sidebar (navigation menu on the left) is also translatable. Please follow dedicated instructions on Localisation Sidebar page.
REMARK: The first time you switch a page to the new translation system, it looses all its old 'manual' translations. To recover the translation, you need to open an earlier version from the history, and copy/paste manually the paragraphs to the new translation system.
Remark: to be able to translate in the wiki, you must of course gain wiki edit permission.
Om du är osäker på hur du ska fortsätta, tveka inte att be om hjälp på forumet.
Old translation instructions
These instructions are for historical background only, while the pages are being passed to the new translation plugin. |
So the first step is to check if the manual translation has already been started for your language (look in the left sidebar, under "manual").
Page Naming Convention
#REDIRECT [[About FreeCAD/fr]]
{{docnav/fr|Bienvenue sur l'aide en ligne|Fonctionnalités}} The page "Bienvenue sur l'aide en ligne" redirects to Online Help Startpage/fr, and the page "Fonctionnalités" redirects to Feature list/fr. |