ufal / lindat-kontext

An alternative web front-end for the Manatee corpus search engine
GNU General Public License v2.0
5 stars 1 forks source link

Localisation of JSON files #157

Open TomazErjavec opened 6 years ago

TomazErjavec commented 6 years ago

We are now localising to Slovene the file /public/files/js/views/messages.json/messages.json and are having some problems understanding the format implemented for different strings dependent on the variable. For example, if we take the following message and its translation to Czech:

"global__there_are_tasks_running_{num_tasks}": "You have {num_tasks, plural, one{is # running task} other{are # running tasks}} on the server.",
...
"global__there_are_tasks_running_{num_tasks}": "Na serveru máte {num_tasks, plural, one{# běžící úlohu} few{# běžící úlohy} other{# running tasks}}.",

It seems that "plural", "one", "few", "other" are flags set in accordance with the value of the integer variable num_tasks. However, under this assumption:

Sorry if this is explained somewhere, but I couldn't find the documentation.