Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
feat(i18n): localize preferences (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Mar 26, 2024
1 parent e30720a commit 74e584f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
12 changes: 7 additions & 5 deletions Contents/DefaultPrefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"id": "enum_locale",
"type": "enum",
"label": "Web UI Locale",
"label": "enum_locale",
"default": "en",
"values": [
"de",
Expand All @@ -12,27 +12,29 @@
"es",
"fr",
"it",
"ru"
"ru",
"sv",
"zh"
]
},
{
"id": "str_http_host",
"type": "text",
"label": "Web UI Host Address (requires Plex Media Server restart)",
"label": "str_http_host",
"default": "0.0.0.0",
"secure": "false"
},
{
"id": "int_http_port",
"type": "text",
"label": "Web UI Port (requires Plex Media Server restart)",
"label": "int_http_port",
"default": "9595",
"secure": "false"
},
{
"id": "bool_log_werkzeug_messages",
"type": "bool",
"label": "Log all web server messages (requires Plex Media Server restart)",
"label": "bool_log_werkzeug_messages",
"default": "False",
"secure": "false"
}
Expand Down
6 changes: 6 additions & 0 deletions Contents/Strings/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"bool_log_werkzeug_messages": "Log all web server messages (requires Plex Media Server restart)",
"enum_locale": "Web UI Locale",
"int_http_port": "Web UI Port (requires Plex Media Server restart)",
"str_http_host": "Web UI Host Address (requires Plex Media Server restart)"
}
19 changes: 17 additions & 2 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
"base_path": "."
"base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only)
"preserve_hierarchy": false # flatten tree on crowdin
"preserve_hierarchy": true # false will flatten tree on crowdin, but doesn't work with dest option
"pull_request_labels": [
"crowdin",
"l10n"
Expand All @@ -10,13 +10,28 @@
"files": [
{
"source": "/Contents/Strings/*.po",
"dest": "/%original_file_name%",
"translation": "/Contents/Strings/%two_letters_code%/LC_MESSAGES/%original_file_name%",
"languages_mapping": {
"two_letters_code": {
# map non-two letter codes here, left side is crowdin designation, right side is babel designation
"en-GB": "en_GB",
"en-US": "en_US"
}
}
},
"update_option": "update_as_unapproved"
},
{
"source": "/Contents/Strings/en.json",
"dest": "/themerr-plex.json",
"translation": "/Contents/Strings/%two_letters_code%.%file_extension%",
"languages_mapping": {
"two_letters_code": {
# map non-two letter codes here, left side is crowdin designation, right side is plex designation
"en-GB": "en-gb",
"en-US": "en-us"
}
},
"update_option": "update_as_unapproved"
}
]

0 comments on commit 74e584f

Please sign in to comment.