Skip to content

Commit

Permalink
updates for release 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Mar 25, 2014
1 parent bf40594 commit 72240db
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 0.6.1

2014-03-25

* really minor update, mainly to get konopas.org/util/i18n to match latest release
* improved & updated README
* switched to Makefile from build.sh
* mv src/i18n.js i18n/i18n.js
* added linebreaks to konopas.min.js & switched lessc to use yui-compress


# 0.6.0

2014-03-15
Expand Down
38 changes: 17 additions & 21 deletions i18n/i18n.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
(function(){ window.i18n || (window.i18n = {})
(function(){ window.i18n || (window.i18n = {})
var MessageFormat = { locale: {} };
MessageFormat.locale.en=function(n){return n===1?"one":"other"}
window.i18n.get = function(n, k, d) {
var m = this[n], f = function(k, d){return typeof m[k] == "function" ? m[k](d) : k in m ? m[k] : k};
return !m ? null
: (typeof k == "undefined") ? f
: (typeof d == "undefined") ? typeof m[k] == "function" ? m[k] : function(){return m[k]}
: f(k, d);
}
window.i18n.fill = function(lc, ka) {
var i,n,k,d,a,g = this.get(lc), l = document.querySelectorAll('['+ka+']');
if (g) for (i = 0; n = l[i]; ++i) {
k = n.getAttribute(ka) || n.textContent.trim();
d = n.getAttribute(ka+'-var');
if (d) d = JSON.parse('{'+d.replace(/[^,:]+/g, '"$&"')+'}');
a = n.getAttribute(ka+'-attr');
if (a) n.setAttribute(a, g(k,d));
else n.innerHTML = g(k,d);
}
}
MessageFormat.locale.en=function (n){return n===1?"one":"other"}
window.i18n.get=function(n,k,d){
var m=this[n],f=function(k,d){return typeof m[k]=="function"?m[k](d):k in m?m[k]:k};
return !m?null
:typeof k=="undefined"?f
:typeof d=="undefined"?typeof m[k]=="function"?m[k]:function(){return m[k]}
:f(k,d)}
window.i18n.fill=function(c,s){
var i,n,k,d,a,g=this.get(c),l=document.querySelectorAll('['+s+']');
if(g)for(i=0;n=l[i];++i){
k=n.getAttribute(s)||n.textContent.trim();
d=n.getAttribute(s+'-var');
d&&(d=JSON.parse('{'+d.replace(/[^,:]+/g,'"$&"')+'}'));
a=n.getAttribute(s+'-attr');
a?n.setAttribute(a,g(k,d)):n.innerHTML=g(k,d)}}
var
c=function(d){if(!d)throw new Error("MessageFormat: No data passed to function.")},
n=function(d,k,o){if(isNaN(d[k]))throw new Error("MessageFormat: `"+k+"` isnt a number.");return d[k]-(o||0)},
Expand Down Expand Up @@ -59,4 +55,4 @@ window.i18n["en"] = {
"ical_hint":"Note that changes you make in this guide may take some time to show in your external calendar software.",
"ical_make":function(d){return "To view your selection in your calendar app, you may also <br class=\"wide-only\">"+v(d,"A_TAG")+"make it available</a> in iCal (.ics) calendar format"},
"login_why":"Once you've verified your e-mail address, you'll be able to sync your data between different clients (including external calendars), as well as vote & comment on items."}
})();
})();

0 comments on commit 72240db

Please sign in to comment.