Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

Obě strany předchozí revize Předchozí verze
Následující verze
Předchozí verze
skoda-ep:translation_guide [13.12.2016 10:42]
Lukáš Čech
skoda-ep:translation_guide [15.06.2018 06:36] (aktuální)
Lukáš Čech [Non-breaking/Hard spaces]
Řádek 6: Řádek 6:
   * (optional) a directory named "​**admin-only**"​ - files in this directory translated items that are only used within the administration of WordPress and do not need to be translated (unless you want to localize the administrative area as well.)   * (optional) a directory named "​**admin-only**"​ - files in this directory translated items that are only used within the administration of WordPress and do not need to be translated (unless you want to localize the administrative area as well.)
  
-You will need an application to translate these files (refered to as "​__POEdit__"​). You can download the application for Windows here: [[https://​download.poedit.net/​Poedit-1.8.11-setup.exe|POEdit for Windows]] or if you are a Mac user, you can use OS X application found here[[https://download.poedit.net/​Poedit-1.8.11.zip|POEdit for OS X]] (the guide is written for the Windows application,​ so it might differ slightly). If you are using Linux, you can use the package for your distribution or compile the package from source code found on the [[https://poedit.net/​download|POEdit download page]]+You will need an application to translate these files (refered to as "​__POEdit__"​). You can [[.:translation_guide:poedit_versions|download ​the application from this page]] (select ​the one you needWindows/Mac/Linux)
  
 The __translation files__ contain all the text that can be translated on the site. We need your help translating it into your language. The text is usually in English. ​ The __translation files__ contain all the text that can be translated on the site. We need your help translating it into your language. The text is usually in English. ​
Řádek 16: Řádek 16:
   - Inside the POEdit directory, you will find an application called "​PoeditPortable.exe"​ or "​Poedit.exe"​ or similar (depending on your operating system). Open the file to start the application   - Inside the POEdit directory, you will find an application called "​PoeditPortable.exe"​ or "​Poedit.exe"​ or similar (depending on your operating system). Open the file to start the application
   - You will see a welcome screen, select "​**Edit a translation**",​ locate the **project directory** and select one of the __translation files__ (for example '​name-of-the-plugin-fr_FR.po'​ for WordPress plugins or just '​fr_FR.po'​ for the theme - you might be able to skip some files, for example newsletters-lite-fr_FR.po if you are not using newsletters. Please send us a message if you are not sure.)   - You will see a welcome screen, select "​**Edit a translation**",​ locate the **project directory** and select one of the __translation files__ (for example '​name-of-the-plugin-fr_FR.po'​ for WordPress plugins or just '​fr_FR.po'​ for the theme - you might be able to skip some files, for example newsletters-lite-fr_FR.po if you are not using newsletters. Please send us a message if you are not sure.)
 +  - It is very helpful to sort the translations showing translated strings at the bottom: Select View from the main menu, then select "​Untranslated entries first"
 +  - Sometimes it can also prove helpful to sort translations by "File order" (View -> Sort by File Order) - this usually means the related translations will be next to each other
  
  
 Now you should see the following screen: Now you should see the following screen:
  
-{{:​skoda-ep:​poedit.jpg?​200|}}+{{ :​skoda-ep:​poedit.jpg?​200 | }} 
 + 
 + 
 +{{ :​skoda-ep:​translation.gif | }} 
 + 
 + 
 +----
  
  
 **The first area** contains all the text which can be translated. ​ **The first area** contains all the text which can be translated. ​
-Sometimes, you can see a part of the string in [brackets] - this is an explanation of the string itself - it tells you the context in which the string is used within the page.+ 
 +==== Context ==== 
 + 
 +Sometimes, you can see a part of the string in **[**brackets**]** - this is an explanation of the string itself - it tells you the context in which the string is used within the page.
 For example: ​ For example: ​
   * I wish to sign up for an event [in the registration form]   * I wish to sign up for an event [in the registration form]
Řádek 45: Řádek 56:
  
 Now you need to select each string individually from the **first area** and type the translation into the **third area** Now you need to select each string individually from the **first area** and type the translation into the **third area**
- 
-===== Placeholders inside the text and special symbols ===== 
-Sometimes it is important to insert something inside the sentence; however, it could have a different position inside the sentence in each language. 
-In this example, we want to insert a name of the company "Your System"​ into the sentence: 
- 
-//We have received the files from **Your System** at the beginning of the month// 
- 
-But in Czech, we need to place "Your System"​ at the end of the sentence to use it correctly: 
- 
-//Na zacatku mesice jsme prijali soubory od firmy **Your System**// 
- 
-To accommodate for this, you might see placeholders like "​%s"​ for a string or "​%d"​ for a number and it is your responsibility to place it in a correct position in the translated sentence. 
-This is what it looks like: 
- 
-{{ :​skoda-ep:​placeholder.png?​200|}} 
- 
-{{ :​skoda-ep:​translation_placeholders.gif|}} 
- 
-Generally, if you see some symbols in the original string, they need to be placed somewhere in the translation. If you are not sure, send us an email asking about it, or leave it at the same position as it is in the original. 
- 
  
  
Řádek 85: Řádek 76:
  
  
-{{ :​skoda-ep:​plurals.png?​200|}}+{{ :​skoda-ep:​plurals.png?​200 |}}
  
-{{ :​skoda-ep:​translation.gif|}} 
  
 This is an example from Slovak or Czech language, where the plural is different for 1 day/2, 3 or 4 days/0, 5 or more days. This is an example from Slovak or Czech language, where the plural is different for 1 day/2, 3 or 4 days/0, 5 or more days.
Řádek 95: Řádek 85:
 "​dny"​ into the box from tab "n -> 2, 3, 4"; "​dny"​ into the box from tab "n -> 2, 3, 4";
 "​dnu"​ into the box from tab "n -> 0, 5, 6, 7..." "​dnu"​ into the box from tab "n -> 0, 5, 6, 7..."
 +
 +
 +===== Placeholders inside the text and special symbols =====
 +Sometimes it is important to insert something inside the sentence; however, it could have a different position inside the sentence in each language.
 +In this example, we want to insert a name of the company "Your System"​ into the sentence:
 +
 +//We have received the files from **Your System** at the beginning of the month//
 +
 +But in Czech, we need to place "Your System"​ at the end of the sentence to use it correctly:
 +
 +//Na zacatku mesice jsme prijali soubory od firmy **Your System**//
 +
 +To accommodate for this, you might see placeholders like "​%s"​ or "​%s$1"​ for a string or "​%d"​ or "​%d$1"​ for a number and it is your responsibility to place it in a correct position in the translated sentence.
 +This is what it looks like (click):
 +
 +
 +{{ :​skoda-ep:​placeholder.png?​300 |}}
 +
 +We also use these placeholders for making some parts of the text bold or different color or to create a link, for example "You have to agree to %s$1our terms and conditions%s$2"​ - our terms and conditions will be a link to a document.
 +
 +{{ :​skoda-ep:​translation_placeholders.gif | }}
 +
 +----
 +
 +Generally, if you see some symbols in the original string, they need to be placed somewhere in the translation. If you are not sure, send us an email asking about it, or leave it at the same position as it is in the original.
 +
 +
 +
 +===== Non-breaking/​Hard spaces =====
 +
 +Sometimes it is necessary for two words to stay together. You can accomplish this by replacing a standard space with "&​nbsp;"​ (non breaking space)
 +
 +For example: //We run Tour de France contest one time a year!//
 +
 +You want to keep together "Tour de France"​ and "a year" so you use "&​nbsp;"​ like this: //We run Tour&​nbsp;​de&​nbsp;​France contest one time a&​nbsp;​year!//​
 +
 +It is also possible to use the non breaking space character on your computer, but it is a bit [[https://​en.wikipedia.org/​wiki/​Non-breaking_space#​Keyboard_entry_methods|more difficult to achieve on windows machines]].
  
  
Řádek 100: Řádek 127:
  
 When you are done, click the "​**Save**"​ button at the top of the window. This saves the translation and updates both .po and .mo file.  When you are done, click the "​**Save**"​ button at the top of the window. This saves the translation and updates both .po and .mo file. 
-You can **send** these files back to us, either by compressing the whole directory ​**project directory* into a .zip file, or you can send the .mo and .po files individually.+You can **send** these files back to us, either by compressing the whole **project directory** into a .zip file, or you can send the .mo and .po files individually. 
 + 
 +===== TeamViewer ===== 
 + 
 +http://​download.teamviewer.com/​download/​version_11x/​TeamViewerQS.exe