Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first stab at moving js_strings into a .js file
- Loading branch information
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import re | ||
import ckan.lib.base as base | ||
import ckan.lib.i18n as i18n | ||
|
||
class I18NController(base.BaseController): | ||
|
||
def strings(self, lang): | ||
i18n.set_lang(lang) | ||
html = base.render('js_strings.html', cache_force=True) | ||
html = re.sub('<[^\>]*>', '', html) | ||
base.response.headers['Content-type'] = "text/javascript; charset=utf-8" | ||
return html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters