ytmusicapi/ytmusicapi/locales
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-11-11 17:12:24 +01:00
..
ar/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
de/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
en/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
es/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
fr/LC_MESSAGES add fr episodes translation 2023-11-11 17:12:24 +01:00
hi/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
it/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
ja/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
ko/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
nl/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
pt/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
ru/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
tr/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
ur/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
zh_CN/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
zh_TW/LC_MESSAGES search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
base.pot search: support podcasts and episodes 2023-11-11 17:05:13 +01:00
README.rst Add localization for get_artist related artists (#181) 2021-03-24 13:35:02 +01:00
update_mo.sh Feature: add get_user, get_user_playlists 2020-07-21 10:19:35 +02:00
update_po.sh search: support profiles (closes #425) 2023-08-20 17:18:35 +02:00

Translations
============================================
Translations are required for ytmusicapi since it relies on parsing user interface text.
In some places, for example the search() or get_artist() features, there is no other way to tell which content type is
offered other than parsing display text, which depends on the user's language. Changing the API language is desirable,
since artist and song titles are also language dependent.

This package uses the Linux command line utility xgettext, which you can install for example using your package manager.

Add new translatable texts from code
----------------------------------------

``xgettext -d base -o locales/base.pot *.py mixins/*.py parsers/*.py  --from-code "utf-8"``

``sed --in-place locales/base.pot --expression=s/CHARSET/UTF-8/``

Create new translation
----------------------
Create the directories (in this case for English, Spanish):

``mkdir -p locales/{en,es}/LC_MESSAGES``

Copy the base template:

``cp locales/base.pot locales/LANG/LC_MESSAGES/base.po``

Update translation
------------------

``cd locales && sh update_po.sh``

Edit translation
----------------
You can use POEdit or edit the .po file manually

Finalize translation
---------------------
To generate mo files, run

``cd locales && sh update_mo.sh``