Child pages
  • Tłumaczenia
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Tłumaczenia

PrestShop udostępnia Ci narzędzie do pełnego tłumaczenia sklepu. To pozwoli Ci dodawać, oraz edytować strony z tłumaczeniami. W ten sposób będziesz Panem swojego sklepu i będziesz mógł tłumaczyć teksty bez oczekiwania na oficjalne tłumaczenie poprawionych tekstów.

Nawet jeśli nie chcesz poprawiać pracy tłumaczy, możesz chcieć zmienić nazewnictwo przez nich używane (na mniej formalne, mniej wyszukane itp.) i dostosować wiele dostępnych tekstów i w ten sposób dopasować Twoją stronę do widowni. Na przykład sklep z ubraniami dla miłośników Hip Hopu może używać innych wyrażeń aniżeli sklep z luksusowymi zegarkami.

Proces adaptacji programu do obecego języka nazywa się internacjonalizacją i lokalizacją, albo i18n lub L10n w skrócie.

Internacjonalizacja to pierwszy etap, podczas którego developerzy wybierają mechanizm do tłumaczenia oprogramowania. Wszystkie ciągi znaków oprogramowania są następnie przetworzone, aby móc z nich korzystać za pomocą tego mechanizmu.
Lokalizacja jest koeljnym krokiem, gdzie dwójęzyczni lubie wielojęzyczni użytkownicy oprogramowania tłumaczą ciągi znaków na ich język ojczysty. Lokalizacja może także dostarczać lokalnych danych, aby poprawić oprogramowanie dla lokalnych użytkowników. Możesz dowiedzieć się więcej na ten temat z Wikipedii: http://en.wikipedia.org/wiki/Internationalization_and_localization

Ekipa PrestaShopa zdecydowała skorzystać z własnego narzędzia do tłumaczeń, dzięki czemu każdy, kto zainstaluje PrestaShopa, może dostosowywać sklep do własnych potrzeb.
Tłumaczenie tworzone przez społeczność jest dokonywane za pomocą  narzędzi online, które znajduje się tutaj: https://crowdin.net/project/prestashop-official.

Oficjalne paczki tłumaczeń mogą zostać pobrane bezpośrednio z poniższego adresu: http://www.prestashop.com/en/translations.

Modyfikacja tłumacznia

Najważniejszym narzędziem na stronie "Tłumacznia" jest sekcja "Modyfikuj tłumaczenia". To tam możesz  określić edycję tłumaczenia i kompletnie spersonalizować każde zdanie, jeśli chcesz.

Zaznacz część obecnego tłumaczenia, którą chcesz edytować:

  • Tłumacznie stron sklepu. Widoczny tekst dla Twoich klientów podczas przeglądania Twojego sklepu.
  • Tłumacznia panelu administracyjnego. Teksty widoczne dla Ciebie i ekipy obsługującej panel administracyjny.
  • Tłumaczenie informacji o błędach. Wiadomości o błędach, które mogą pojawić się na stronach sklepu.
  • Tłumaczenie nazwy pola. Nazwy pól na stronach sklepu i stronach administracyjnych.
  • Tłumaczenie zainstalowanych modułów. Pojęcia używane przez zainstalowane moduły. Pamiętaj, że moduły, które są dostępne, ale nie zainstalowane, nie będą widoczne.
  • Tłumaczenie PDF. Pojęcia używane w generowanych plikach PDF: faktury,  listy przewozowe itp.
  • Tłumaczenia wiadomości e-mail. Pojęcia używane w domyślnych szablonach wiadomości.

Niektóre kategorie posiadają listy rozwijane, gdzie figurują dostępne szablony. Szablony PrestaShopa posiadają własne ciągi znaków, ale także własne moduły, szablony PDF i wiadomości. W ten sposób lista rozwijana pozwala Ci na wybranie, z którym szablonem chcesz pracować.

Gdy dokonasz wyboru szablonu, wybierz język, który chcesz edytować w danej kategorii.

Pojawi się długa stron a, która zawierać będzie setki dostępnych ciągów znaków dla danej kategorii, czasami podzielona na dziesiątki zbiorów pól.

By default, only the fieldsets which have untranslated strings are open. If you wish to open them all, click on the button on the top left twice: once to close all of them, once more to expand them all. You can open and close fieldsets one by one by clicking on its title.

Editing a translation is easy:

  • Open a fieldset,
  • Edit its content,
  • Click on either the "Update Translations and stay" button to save while and keep translating more for this category, or on the "Update translation" button to save and return to the main "Translations" page.

PrestaShop 1.5 introduced a new syntax where strings can contain placeholders, such as %s, %d, %1$s, %2$d, etc.

When you find a string with such placeholder, it means that PrestaShop will replace it with an actual dynamic value before displaying the translated string.
For instance, in the string "Your order on %s is complete", %s will be replaced by the shop's name. Therefore you should keep it in your final translation; for instance, in French, the translation would be "Votre commande sur %s a bien été enregistrée."

Technically, having placeholders prevents strings from being split in parts. Thereby, in previous version of PrestaShop, "Your order on %s is complete." would have been split in two: "Your order on" and "is complete.". While the literal translation of these worked for some language, it made translation nearly impossible for many other languages, none the less RTL languages such as Arabic or Hebrew. Thanks to the placeholders added in PrestaShop 1.5, such strings are now fully translatable in any language.

Some strings might have a warning icon to their right. This indicates strings with placeholders. You can click on the icon to get more information.
In case of a string with a placeholder, you should make sure that the content of that placeholder will be placed in the correct flow of the sentence, and avoid literal translation.
Numbered placeholders (%1$s, %2$d, etc.) enable translators to rearrange the order of the placeholders in the string while maintaining the information each is replaced with. This way, a French translator could choose to translate "Order #%1$d from %2$s" into "Commande n°%1$s du %2$s" or "Le %2$s, commande n°%1$s".

Specific features

Most translation categories present their strings in the same way: the category's strings are grouped into fieldsets that you can close or expand by clicking on their title. The title indicates the number of expressions that the fieldset contains, and when needed, the number of missing expressions, in brackets and in red.

This is true for most categories, except three:

  • Error messages. Strings are not group into many fieldset, they are all presented together.
  • PDF templates. There is only one fieldset, "PDF".
  • E-mail templates. Strings are split into fieldsets, but they are not simple text fields anymore. Each e-mail has two templates: a HTML one, which is styled and colored, and a text one, when is plain and simple. While the plain text one can be edited directly in the textfield, the HTML one can only be edited by clicking on the "Edit this e-mail template" button at the bottom of the preview. That click turns the preview into a WYSIWYG textfield (what you see is what you get), with a complete editor at the top (based on TinyMCE: http://www.tinymce.com/). In addition to editing the text, you can change the design as you see fit, for instance you can change the colors in order to adhere to your shop's design.
    Note that the e-mail templates feature placeholders, such as {lastname} or {shop_name}, which PrestaShop replaces with the actual values when sending the e-mail. Make sure to keep them in both your translation.

Add / Update a Language

PrestaShop translations are available in packs, which combine all the different translation categories into a zip file. Many language packs are available freely for you to download and install, directly from the PrestaShop.com servers. PrestaShop will take care of downloading the language pack, unpacking it and creating the correct sub-folder in your installation's /translation folder.

You can also update the currently installed languages, likewise directly from the PrestaShop.com servers, but be reminded that any change that you might have made to your own translations will be lost once you update it.

Import a Language Pack Manually

In the case where you do not want to use an official PrestaShop translation pack, but rather a custom one (either provided by someone you know, or one that you exported from another PrestaShop installation), then this tool is for you.

Select the Zip file, select the theme to which you want that pack to be applied to, then click the "Import" button, and it will install the pack in the /translation folder.

If there is already a language folder with the same ISO 639-1 code, it will be replaced by the files from the pack you are importing.

Export a Language

You can create your own language pack using this tool, either as a way of making a backup of your customizations, or in order to share your translations with other PrestaShop installation – your own or someone else's.

Simply choose the language and the theme of the translation you wish to export, and click the "Export" button.

Note that the pack will contain the theme that your translation is supposed to support.

Copy

You can copy the content of one language to another. This is especially useful when you wish to replace a theme's language with the same language from another theme.

Choose the source language and theme, then the destination language and theme, then click the "Copy" button. In most case, the language should remain the same in both drop-down lists.

If there is already a language folder for this language in the destination theme, it will be replaced by the files from the language and theme you are copying.

You might prefer to first create a new language for the destination theme before copying the source language to it.

  • No labels