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.
1.7 KiB
1.7 KiB
ADD SUPPORT FOR NEW LANGUAGE
Requires: GNU GetText (Only if you want to build the MO files on your own)
- Clone or Fork the repository
- Copy youtube-dl-gui/youtube_dl_gui/locale/en_US/LC_MESSAGES/youtube_dl_gui.po to youtube-dl-gui/locale_build/
- Go to youtube-dl-gui/locale_build directory
- Edit the PO file with your favorite text editor (See EDIT section)
- After you have finished the file editing save the file
- Now you have two options
- Send me the translated PO file to this email address: ytubedlg@gmail.com
- Build the binary translation file (MO) on your own using the build scripts (See BUILD section)
EDIT
PO file headers informations: https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html
To translate the PO file just edit the msgstr fields
Example
#: mainframe.py:78
msgid "Download"
msgstr "Add the translation here"
BUILD
-
To build the MO file you need to run the corresponding build script for your OS
Windows: build_locale.bat
Linux: build_locale.sh
Example
Usage: build_locale.sh <language code> <translated PO file>
$ ./build_locale.sh gr_GR gr.po
-
Now you also need to add the corresponding language option under the options frame localization tab
-
Open optionsframe.py
-
Locate the LocalizationTab class
-
Find the LOCALE_NAMES attribute
-
Add your language to the LOCALE_NAMES
Example
LOCALE_NAMES = twodict([
('en_US', 'English'),
('gr_GR', 'Greek')
])
- Save the file and now you can make a new pull request after you push your changes to your remote