Skip to content

Commit

Permalink
docs: clarify differences between several moko formats
Browse files Browse the repository at this point in the history
JetBrains Compose Multiplatform Kotlin Resource is something different
than Mobile Kotlin resources.
  • Loading branch information
nijel committed Jun 19, 2024
1 parent 31bace6 commit 80742ec
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
22 changes: 20 additions & 2 deletions docs/formats/android.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Android string resources

Android specific file format for translating applications.

The same file format is also used by JetBrains Compose Multiplatform Kotlin Resources.

Android string resources are monolingual, the :ref:`component-template` is
stored in a different location from the other files -- :file:`res/values/strings.xml`.

Expand Down Expand Up @@ -58,10 +60,11 @@ Weblate does following escaping of strings:
.. seealso::

`Android string resources documentation <https://developer.android.com/guide/topics/resources/string-resource>`_,
`JetBrains Compose Multiplatform Kotlin Resources <https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-images-resources.html>`_,
:doc:`tt:formats/android`

Weblate configuration
+++++++++++++++++++++
Weblate configuration for Android resource strings
++++++++++++++++++++++++++++++++++++++++++++++++++

+-------------------------------------------------------------------+
| Typical Weblate :ref:`component` |
Expand All @@ -74,3 +77,18 @@ Weblate configuration
+--------------------------------+----------------------------------+
| File format | `Android String Resource` |
+--------------------------------+----------------------------------+

Weblate configuration for JetBrains Compose Multiplatform Kotlin Resources
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+-------------------------------------------------------------------------------------------+
| Typical Weblate :ref:`component` |
+================================+==========================================================+
| File mask | ``commonMain/composeResources/values-*/strings.xml`` |
+--------------------------------+----------------------------------------------------------+
| Monolingual base language file | ``commonMain/composeResources/values/strings.xml`` |
+--------------------------------+----------------------------------------------------------+
| Template for new translations | `Empty` |
+--------------------------------+----------------------------------------------------------+
| File format | `Android String Resource` |
+--------------------------------+----------------------------------------------------------+
6 changes: 6 additions & 0 deletions docs/formats/moko.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Mobile Kotlin resources

`Mobile Kotlin resources`_ specific format heavily based on :doc:`/formats/android`.

.. note::

There is also JetBrains Compose Multiplatform Kotlin Resources which use a
different format which matches :doc:`/formats/android`, please use that
instead.

Weblate configuration
+++++++++++++++++++++

Expand Down

0 comments on commit 80742ec

Please sign in to comment.