Browse Source

Moved i18n to lib

Closes #602
master
Igor Zhukov 10 years ago
parent
commit
d67e85cc2f
  1. 2
      app/index.html
  2. 0
      app/js/lib/i18n.js
  3. 2
      app/js/locales/README.md
  4. 2
      app/webogram.appcache

2
app/index.html

@ -67,6 +67,7 @@ @@ -67,6 +67,7 @@
<script type="text/javascript" src="js/lib/bin_utils.js"></script>
<script type="text/javascript" src="js/lib/tl_utils.js"></script>
<script type="text/javascript" src="js/lib/ng_utils.js"></script>
<script type="text/javascript" src="js/lib/i18n.js"></script>
<script type="text/javascript" src="js/lib/mtproto.js"></script>
<script type="text/javascript" src="js/lib/mtproto_wrapper.js"></script>
@ -74,7 +75,6 @@ @@ -74,7 +75,6 @@
<script type="text/javascript" src="js/services.js"></script>
<script type="text/javascript" src="js/controllers.js"></script>
<script type="text/javascript" src="js/filters.js"></script>
<script type="text/javascript" src="js/i18n.js"></script>
<!--PRODUCTION_ONLY_BEGIN
<script type="text/javascript" src="js/templates.js"></script>

0
app/js/i18n.js → app/js/lib/i18n.js

2
app/js/locales/README.md

@ -81,7 +81,7 @@ This maps a `navigator.language == 'en'` to `en-us` as locale to use. @@ -81,7 +81,7 @@ This maps a `navigator.language == 'en'` to `en-us` as locale to use.
## Using the i18n module while developing
All the i18n functionality is located in the `myApp.i18n` module in `js/i18n.js` and exposed via various ways whereby all the localization is done by the `_` service.
All the i18n functionality is located in the `myApp.i18n` module in `js/lib/i18n.js` and exposed via various ways whereby all the localization is done by the `_` service.
It takes a message key and optional parameters for that key and returns the localized string with parameters incorporated.
When adding new messages the key for that messages should be prefixed with the view name it appears in. If the message (should) contain(s) markdown-like markup (see above) it should additionally have a `_md` suffix.

2
app/webogram.appcache

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
CACHE MANIFEST
# 42
# 43
NETWORK:
*

Loading…
Cancel
Save