MusicBrainz Picard/Internationalization: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
m (→‎Communication: Fix issue searching links)
(Reformat to include new placeholder sections.)
Line 1: Line 1:
= Picard, Picard Website and Picard User Guide Internationalization =
= Translation =

The code for Picard, the User Guide and the website uses gettext to provide the automatic translation of messages and texts used. One or more .pot files, in English, are provided with all the strings used in the application.


== Getting started ==
== Getting started ==
Line 21: Line 23:
== Viewing the translations ==
== Viewing the translations ==


The language displayed can be selected from the currently available translations for the [https://picard.musicbrainz.org/ Picard website], the Picard program itself and the [https://picard-docs.musicbrainz.org/ Picard User Guide].
The language displayed can be selected from the currently available translations for the [https://picard.musicbrainz.org/ Picard website], the Picard program itself and the [https://picard-docs.musicbrainz.org/ Picard User Guide]. Note that the available languages only include those languages that have their translations substantially complete. You are welcome (and encouraged) to provide translations for additional languages.

== User Guide Translation Specifics ==

The User Guide contains a number of items that must be retained as-is and not be translated. These types of items include:

=== Tags and Variables ===

<span style="color: red;"><b>NOTE:</b> This section is a placeholder and needs to be revised.</span>

Translatable messages not only contain plain text or HTML markup, they can also contain replaceable variables. For example:
* In <code>{entity1} has a BookBrainz page at {entity0}</code>, which is a URL-Work relationship link phrase, there are two entity variables whose name should not be translated, since variable <code>{entity1}</code> will be replaced by a work title and <code>{entity0}</code> by a URL.
* In link phrases, variables are often used for (optional) attributes, in order to avoid inflating the number of messages. Below are examples with the “additional” attribute:
** <code>{additional}</code> will be replaced by ''additional'' if the “additional” attribute is set, otherwise it will be removed from the text.
** <code>{additional:additionally}</code> will be replaced by ''additionally'' if the “additional” attribute is set, otherwise it will be removed from the text.
** <code>{additional:an|a}</code> will be replaced by ''an'' if the “additional” attribute is set, otherwise it will be replaced by ''a''.
** <code>{additional:%|regular}</code> will be replaced by ''additional'' if the “additional” attribute is set, otherwise it will be replaced by ''regular''.
** Hence, <code>{additional}</code> can be translated as <code>{additional:aldona}</code> in Esperanto.
* Note that <code>{instrument}</code> and <code>{vocals}</code> variables are replaced by the specific instrument/vocals name:
** <code>{instrument:%|instruments}</code> will be replaced by ''piano'' (or its translation) if the related instrument is “piano”, otherwise it will be replaced by ''instruments''.

=== Special Formatting ===

<span style="color: red;"><b>NOTE:</b> This section is a placeholder and needs to be revised.</span>


The Picard User Guide has been developed using Sphinx to convert the ReStructued Text (rst) files into the various output formats (i.e. html, epub and pdf). The translatable messages not only contain plain text or HTML markup, they can also contain Sphinx roles, directves and formatting information that must be retained (and not translated). For example:
== Development ==


* Roles are typically shown as the role between colons (:) followed immediately by the role information surrounded by backticks (`). Some examples include:
The code for Picard, the User Guide and the website uses gettext to provide the automatic translation of messages and texts used. A POT file, in English, is provided with all the strings used in the application.
** :doc:`/about/acknowledgements`
** (add other examples)
* Directives are typically shown with the directive immediately proceeded by two periods (..) and may be immediately followed by one or two colons (:). Some examples include:
** (add examples)
* Links are shown as
** (add examples)


[[Category:To Be Reviewed]] [[Category:Internationalization]]
[[Category:To Be Reviewed]] [[Category:Internationalization]]

Revision as of 17:57, 26 May 2023

Picard, Picard Website and Picard User Guide Internationalization

The code for Picard, the User Guide and the website uses gettext to provide the automatic translation of messages and texts used. One or more .pot files, in English, are provided with all the strings used in the application.

Getting started

If you want to help translate the text displayed in MusicBrainz Picard, the Picard website or the documentation in the Picard User Guide, go to the [TBD Weblate page] and create an account. The Picard translations are under the Picard project and the User Guide translations are under the [TBD Picard Docs] project. If there is already a team for your language, you can join it, if not, you can ask for the creation of a new team.

NOTE: The Weblate page is currently under development and testing, and is NOT currently available for production use.

Communication

The MetaBrainz community forums can be used (with categories and tags) for discussion beyond Weblate comments:

For instant conversation with developers, you’re welcome to ask in the #metabrainz IRC channel.

If you find a mistake in the translations, or want to suggest changes, you can enter an issue in our bug tracker for the applicable project:

Viewing the translations

The language displayed can be selected from the currently available translations for the Picard website, the Picard program itself and the Picard User Guide. Note that the available languages only include those languages that have their translations substantially complete. You are welcome (and encouraged) to provide translations for additional languages.

User Guide Translation Specifics

The User Guide contains a number of items that must be retained as-is and not be translated. These types of items include:

Tags and Variables

NOTE: This section is a placeholder and needs to be revised.

Translatable messages not only contain plain text or HTML markup, they can also contain replaceable variables. For example:

  • In {entity1} has a BookBrainz page at {entity0}, which is a URL-Work relationship link phrase, there are two entity variables whose name should not be translated, since variable {entity1} will be replaced by a work title and {entity0} by a URL.
  • In link phrases, variables are often used for (optional) attributes, in order to avoid inflating the number of messages. Below are examples with the “additional” attribute:
    • {additional} will be replaced by additional if the “additional” attribute is set, otherwise it will be removed from the text.
    • {additional:additionally} will be replaced by additionally if the “additional” attribute is set, otherwise it will be removed from the text.
    • {additional:an|a} will be replaced by an if the “additional” attribute is set, otherwise it will be replaced by a.
    • {additional:%|regular} will be replaced by additional if the “additional” attribute is set, otherwise it will be replaced by regular.
    • Hence, {additional} can be translated as {additional:aldona} in Esperanto.
  • Note that {instrument} and {vocals} variables are replaced by the specific instrument/vocals name:
    • {instrument:%|instruments} will be replaced by piano (or its translation) if the related instrument is “piano”, otherwise it will be replaced by instruments.

Special Formatting

NOTE: This section is a placeholder and needs to be revised.

The Picard User Guide has been developed using Sphinx to convert the ReStructued Text (rst) files into the various output formats (i.e. html, epub and pdf). The translatable messages not only contain plain text or HTML markup, they can also contain Sphinx roles, directves and formatting information that must be retained (and not translated). For example:

  • Roles are typically shown as the role between colons (:) followed immediately by the role information surrounded by backticks (`). Some examples include:
    • :doc:`/about/acknowledgements`
    • (add other examples)
  • Directives are typically shown with the directive immediately proceeded by two periods (..) and may be immediately followed by one or two colons (:). Some examples include:
    • (add examples)
  • Links are shown as
    • (add examples)