[DAEMON-65] appcd-response: Improve i18n API
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Low |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2017-03-24T21:31:28.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Appc Daemon 1.0.0 |
Components | appcd-response |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2017-03-22T18:47:00.000+0000 |
Updated | 2017-10-26T03:05:37.000+0000 |
Description
appcd-response handles single strings only. It will probably be handy to create
\_\_()
and \_\_n()
functions to expose the i18n engine for single strings and pluralized strings.
Strings are stored in a messages/<locale>/strings.json
file where the key is the English text and the value is the translated text. We should just follow https://github.com/mashpie/i18n-node and allow the value to be an array where the first element is the singular string and the second element is the plural string.
No comments