Commit 78662821 authored by echel0n's avatar echel0n
Browse files

Added Gettext translation features to core javascript code

parent 2a12ed23
......@@ -29,6 +29,7 @@
"_": true,
"window": true,
"Bloodhound": true,
"Gettext": true,
"jconfirm": true
}
}
\ No newline at end of file
......@@ -433,14 +433,14 @@ module.exports = function (grunt) {
var tasks = [
'exec:babel_extract',
'exec:babel_update',
'exec:babel_compile',
'po2json'
];
if (process.env.CROWDIN_API_KEY) {
tasks.splice(2, 0, 'exec:crowdin_upload', 'exec:crowdin_download'); // insert items at index 2
tasks.splice(1, 0, 'exec:crowdin_upload', 'exec:crowdin_download'); // insert items at index 1
} else {
tasks.splice(1, 0, 'exec:babel_update'); // insert item at index 1
grunt.log.warn('Environment variable `CROWDIN_API_KEY` is not set, not syncing with Crowdin.'.bold);
}
......
......@@ -33,7 +33,8 @@
"bookmarkscroll": "http://dynamicdrive.com/dynamicindex5/bookmarkscroll.js",
"scrollup": "~2.4.1",
"qtip2": "git://github.com/qTip2/qTip2.git#v3.0.3",
"components-font-awesome": "^4.7.0"
"components-font-awesome": "^4.7.0",
"jsgettext": "~0.8.1"
},
"resolutions": {
"jquery": "~3.2.1",
......
# Changelog
- * ae0aded - 2017-10-15: Added more i18n support for strings
- * 9aa88b1 - 2017-10-15: Added Gettext translation features to core javascript code
- * 2a12ed2 - 2017-10-15: Added more i18n support for strings
- * c1ab882 - 2017-10-15: Fixed issues with setting minimum seeders and leechers
- * 7b9275f - 2017-10-15: Optimized placement of gettext installation code
- * 76cca85 - 2017-10-15: Converted more strings to i18n
......
This diff is collapsed.
This diff is collapsed.
......@@ -8,7 +8,7 @@ universal = 1
width = 80
charset = utf-8
output-file = sickrage/locale/messages.pot
keywords = _n:1,2
keywords = gt
copyright-holder = SiCKRAGE
msgid-bugs-address = [email protected]
add-comments = TRANSLATORS:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -19,6 +19,7 @@
from __future__ import unicode_literals
import datetime
import io
import os
import re
import threading
......@@ -370,6 +371,17 @@ class WebRoot(WebHandler):
self.set_header('Content-Type', 'text/plain')
return "User-agent: *\nDisallow: /"
def messages_json(self):
""" Get /sickrage/locale/{lang_code}/LC_MESSAGES/messages.json """
locale_file = os.path.join(sickrage.LOCALE_DIR, sickrage.srCore.srConfig.GUI_LANG, 'LC_MESSAGES/messages.json')
if os.path.isfile(locale_file):
self.set_header('Content-Type', 'application/json')
with io.open(locale_file, 'r') as f:
return f.read()
self.set_status(204)
def apibuilder(self):
def titler(x):
return (remove_article(x), x)[not x or sickrage.srCore.srConfig.SORT_ARTICLE]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment