You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.1 KiB
2.1 KiB
ADD SUPPORT FOR NEW LANGUAGE
Requirements
- GNU gettext (To build the MO files)
Notes
- Do NOT send me the PO files via email since i'm not looking at them anymore
- See the Help & Helpful links sections below for help
- The instructions below assume basic knowledge of the command line (OS independent)
Getting started
- Fork the project
- Create a local clone of your fork repo
- Change directory into youtube-dl-gui
- Run the new-locale.py script under the devscripts directory
- Edit the created PO file with your favorite editor
- Add the new language in the optionsframe.py file
- Build the binary translation files (MO) using the setup.py script:
python setup.py build_trans
- Test the translations by running youtube-dl-gui:
python -m youtube_dl_gui
- Push your changes:
git add -A
git commit -m "Your commit message here"
git push origin master
- Open a new pull request
Help
-
The language code being used should be in the format
<ISO 639-1>_<ISO 3166-1 alpha-2>
(e.g. en_US) -
To translate the PO file just edit the msgstr fields as shown below:
msgid "Download"
msgstr "ダウンロード"
- In order for youtube-dl-gui to display the new language you must add it to the optionsframe.py file:
- Open optionsframe.py with your favorite editor
- Locate the LOCALE_NAMES attribute
- Add your language to it (make sure to sort alphabetically based on the language name)
LOCALE_NAMES = twodict([
('en_US', 'English'),
+ ('ja_JP', 'Japanese')
])