You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7c780d1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: developer_manual/basics/translations.rst
+148-4Lines changed: 148 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -304,10 +304,11 @@ This allows translators to have the cloudlink before the browselink in case the
304
304
Provide context hints for translators
305
305
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
306
306
307
-
In case some translation strings may be translated wrongly because they have multiple meanings.
308
-
Especially translations strings that only contain a single word often result in problems.
309
-
The most famous example in the Nextcloud code base is ``Share`` which can which can be the verb and action ``To share something`` or the noun ``A share``.
310
-
The added hints will be shown in the Transifex web-interface:
307
+
Some translation strings can be translated wrongly because they have multiple meanings.
308
+
Strings that contain only a single word are especially prone to this.
309
+
The most famous example in the Nextcloud code base is ``Share``, which can be the verb and action
310
+
``To share something`` or the noun ``A share``.
311
+
Adding a context hint resolves the ambiguity, and the hint is shown to translators in the Transifex web interface.
311
312
312
313
.. warning::
313
314
@@ -376,6 +377,16 @@ In the ``<template>`` block, use an HTML comment on the line above the element:
376
377
377
378
In the ``<script>`` block, use the same ``//`` style as JavaScript.
378
379
380
+
.. note::
381
+
382
+
The marker depends on the extraction toolchain, and the examples below are **not** all
383
+
``TRANSLATORS``. The gettext-based projects - PHP, JavaScript/TypeScript and Vue - require the
384
+
comment to start with ``TRANSLATORS``, because that is the prefix the extractor is configured to
385
+
look for. Android uses a plain XML comment and ``TRANSLATORS`` there is a project convention
386
+
rather than a requirement. **Qt and iOS use their own markers** - ``//:`` for ``lupdate`` and a
387
+
``/* ... */`` comment for the iOS string tooling - and writing ``TRANSLATORS`` in those files
388
+
produces no hint at all, because the extractor never looks for it.
389
+
379
390
C++ (Qt) / Desktop client
380
391
"""""""""""""""""""""""""
381
392
@@ -400,6 +411,139 @@ iOS
400
411
/* The title on the navigation bar of the Scanning screen. */
401
412
"wescan.scanning.title"="Scanning";
402
413
414
+
Contributing a context hint without a local checkout
0 commit comments