Use momentjs for timestamp localization
Let momentjs handle proper pluralization of relative times. This comes at the sacrifice of displaying 'minutes' in the conversation list timestamp rather than 'min'. Note that we don't use moment's fromNow instance method so as to preserve the rounding logic that matches the Android client. // FREEBIE
This commit is contained in:
parent
78b8fbc836
commit
67c7a06c28
4 changed files with 25 additions and 53 deletions
|
@ -169,9 +169,12 @@
|
|||
return chrome.i18n.getMessage(message, substitutions);
|
||||
}
|
||||
};
|
||||
if (window.chrome && chrome.i18n) {
|
||||
moment.locale(chrome.i18n.getUILanguage());
|
||||
}
|
||||
i18n.getLocale = function() {
|
||||
if (window.chrome && chrome.i18n) {
|
||||
return chrome.i18n.getUILanguage();
|
||||
}
|
||||
return 'en';
|
||||
};
|
||||
|
||||
window.textsecure = window.textsecure || {};
|
||||
window.textsecure.registration = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue