[Pkg-javascript-commits] [gettext.js] 01/03: New upstream version 0.5.4

Mathias Behrle mbehrle at moszumanska.debian.org
Wed Oct 25 08:51:30 UTC 2017


This is an automated email from the git hooks/post-receive script.

mbehrle pushed a commit to branch master
in repository gettext.js.

commit e5bb23520ffa131d202a6e70aab3ef1a708dd76f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Oct 25 10:41:07 2017 +0200

    New upstream version 0.5.4
---
 README.md      | 4 ++++
 lib/gettext.js | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 9e05f9b..19ca8f5 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,10 @@ and without any tests.
 
 ## Installation
 
+### Debian (9, stretch)
+
+apt-get install libjs-gettext.js
+
 ### Node
 
 Install the lib with the following command: `npm install gettext.js --save`
diff --git a/lib/gettext.js b/lib/gettext.js
index 6510c52..92d93b4 100644
--- a/lib/gettext.js
+++ b/lib/gettext.js
@@ -7,7 +7,7 @@
     // default values that could be overriden in i18n() construct
     var defaults = {
       domain: 'messages',
-      locale: document.documentElement.getAttribute('lang') || 'en',
+      locale: (document ? document.documentElement.getAttribute('lang') : false) || 'en',
       plural_func: function (n) { return { nplurals: 2, plural: (n!=1) ? 1 : 0 }; },
       ctxt_delimiter: String.fromCharCode(4) // \u0004
     };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/gettext.js.git



More information about the Pkg-javascript-commits mailing list