refs #1106 Always fallback to English when the translation key is missing

This commit is contained in:
AkiraFukushima 2019-11-18 22:32:43 +09:00
parent ea97982d83
commit 0111f123de
10 changed files with 7 additions and 461 deletions

6
package-lock.json generated
View File

@ -5331,7 +5331,7 @@
"dependencies": {
"resolve": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
"resolved": "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
"dev": true
}
@ -14527,7 +14527,7 @@
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@ -14542,7 +14542,7 @@
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {

View File

@ -5,20 +5,20 @@ import Backend from 'i18next-sync-fs-backend'
const options: InitOptions = {
initImmediate: false,
lng: 'en',
fallbackLng: 'en',
saveMissing: true,
backend: {
// path where resources get loaded from
loadPath: path.resolve(__dirname, './locales/{{lng}}/{{ns}}.json'),
// path to post missing resources
addPath: path.resolve(__dirname, './locales/{{lng}}/{{ns}}.missing.json'),
addPath: path.resolve(__dirname, './locales/en/{{ns}}.json'),
// jsonIndent to use when storing json files
jsonIndent: 2
}
}
i18next
.use(Backend)
.init(options)
i18next.use(Backend).init(options)
export default i18next

View File

@ -1,88 +0,0 @@
{
"side_menu": {
"follow_requests": "Follow Requests"
},
"header_menu": {
"follow_requests": "Follow Requests",
"filter": {
"show_dms": "Show direct messages"
}
},
"settings": {
"timeline": {
"unread_notification": {
"title": "Unread Notification",
"description": "Customize unread notifications for each timelines."
}
}
},
"search": {
"tag": "Hashtag"
},
"modals": {
"shortcut": {
"title": "Keyboard shortcuts",
"ctrl_number": "Switch accounts",
"ctrl_k": "Jump to other timelines",
"ctrl_n": "Open the new toot modal",
"ctrl_enter": "Post the toot",
"ctrl_r": "Reload current timeline",
"j": "Select the next toot",
"k": "Select the previous toot",
"h": "Switch the focus to left column",
"l": "Switch the focus to right column",
"r": "Reply to the toot",
"b": "Reblog the toot",
"f": "Favourite the toot",
"o": "Open details of the toot",
"p": "Open account profile of the toot",
"i": "Open the images",
"x": "Show/hide CW and NSFW",
"esc": "Close current page"
}
},
"preferences": {
"general": {
"timeline": {
"description": "Customize view in your timelines."
},
"other": {
"title": "Other options",
"launch": "Launch app on login"
}
},
"network": {
"title": "Network",
"proxy": {
"title": "Proxy Configuration",
"no": "No proxy",
"system": "Use system proxy",
"manual": "Manual proxy configuration",
"protocol": "Protocol",
"host": "Proxy host",
"port": "Proxy port",
"username": "Proxy username",
"password": "Proxy password",
"protocol_list": {
"http": "http",
"https": "https",
"socks4": "socks4",
"socks4a": "socks4a",
"socks5": "socks5",
"socks5h": "socks5h"
}
},
"save": "Save"
}
},
"message": {
"follow_request_accept_error": "Failed to accept the request",
"follow_reuqest_reject_error": "failed to reject the request",
"start_all_streamings_error": "Failed to start streaming of {{domain}}",
"domain_doesnt_exist": "Failed to connect {{domain}}, make sure the server URL"
},
"login": {
"proxy_info": "If you want to use proxy server, please setup your proxy in",
"proxy_here": " here"
}
}

View File

@ -1 +0,0 @@
{}

View File

@ -1,45 +0,0 @@
{
"modals": {
"shortcut": {
"ctrl_r": "Reload current timeline"
}
},
"preferences": {
"general": {
"other": {
"title": "Other options",
"launch": "Launch app on login"
}
},
"network": {
"title": "Network",
"proxy": {
"title": "Proxy Configuration",
"no": "No proxy",
"system": "Use system proxy",
"manual": "Manual proxy configuration",
"protocol": "Protocol",
"host": "Proxy host",
"port": "Proxy port",
"username": "Proxy username",
"password": "Proxy password",
"protocol_list": {
"http": "http",
"https": "https",
"socks4": "socks4",
"socks4a": "socks4a",
"socks5": "socks5",
"socks5h": "socks5h"
}
},
"save": "Save"
}
},
"login": {
"proxy_info": "If you want to use proxy server, please setup your proxy in",
"proxy_here": " here"
},
"message": {
"domain_doesnt_exist": "Failed to connect {{domain}}, make sure the server URL"
}
}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1,126 +0,0 @@
{
"preferences": {
"general": {
"timeline": {
"title": "Timeline",
"description": "Customize view in your timelines.",
"cw": "Always ignore contents warnings",
"nfsw": "Always ignore NFSW of medias",
"hideAllAttachments": "Hide all medias"
},
"other": {
"title": "Other options",
"launch": "Launch app on login"
}
},
"appearance": {
"toot_padding": "Padding around toot"
},
"network": {
"title": "Network",
"proxy": {
"title": "Proxy Configuration",
"no": "No proxy",
"system": "Use system proxy",
"manual": "Manual proxy configuration",
"protocol": "Protocol",
"host": "Proxy host",
"port": "Proxy port",
"username": "Proxy username",
"password": "Proxy password",
"protocol_list": {
"http": "http",
"https": "https",
"socks4": "socks4",
"socks4a": "socks4a",
"socks5": "socks5",
"socks5h": "socks5h"
}
},
"save": "Save"
}
},
"side_menu": {
"mention": "Mentions",
"follow_requests": "Follow Requests"
},
"header_menu": {
"mention": "Mentions",
"follow_requests": "Follow Requests",
"filter": {
"show_dms": "Show direct messages"
}
},
"follow_requests": {
"accept": "Accept",
"reject": "Reject"
},
"modals": {
"new_toot": {
"footer": {
"poll": "Add a poll"
},
"poll": {
"add_choice": "Add a choice",
"expires": {
"5_minutes": "5 minutes",
"30_minutes": "30 minutes",
"1_hour": "1 hour",
"6_hours": "6 hours",
"1_day": "1 day",
"3_days": "3 days",
"7_days": "7 days"
}
}
},
"report": {
"title": "Reporting this user",
"comment": "Additional comments",
"cancel": "Cancel",
"ok": "Report"
},
"shortcut": {
"ctrl_r": "Reload current timeline"
}
},
"cards": {
"toot": {
"poll": {
"vote": "Vote",
"votes_count": "votes",
"until": "until {{datetime}}",
"left": "{{datetime}} left",
"refresh": "Refresh"
}
}
},
"message": {
"follow_request_accept_error": "Failed to accept the request",
"follow_reuqest_reject_error": "failed to reject the request",
"start_all_streamings_error": "Failed to start streaming of {{domain}}",
"domain_doesnt_exist": "Failed to connect {{domain}}, make sure the server URL"
},
"validation": {
"new_toot": {
"poll_invalid": "Invalid poll choices"
}
},
"notification": {
"favourite": {
"title": "Favourite",
"body": "{{username}} favourited your status"
},
"follow": {
"title": "Follow",
"body": "{{username}} is now following you"
},
"reblog": {
"title": "Reblog",
"body": "{{username}} boosted your status"
}
},
"login": {
"proxy_info": "If you want to use proxy server, please setup your proxy in",
"proxy_here": " here"
}
}

View File

@ -1,147 +0,0 @@
{
"side_menu": {
"mention": "Mentions",
"direct": "Direct messages",
"follow_requests": "Follow Requests"
},
"header_menu": {
"settings": "Settings",
"follow_requests": "Follow Requests",
"mention": "Mentions",
"direct_messages": "Direct Messages",
"filter": {
"show_dms": "Show direct messages"
}
},
"settings": {
"timeline": {
"title": "Timeline",
"unread_notification": {
"title": "Unread Notification",
"description": "Customize unread notifications for each timelines.",
"direct": "Direct Messages",
"local": "Local Timeline",
"public": "Public Timeline"
}
}
},
"search": {
"tag": "Hashtag"
},
"modals": {
"new_toot": {
"footer": {
"poll": "Add a poll"
},
"poll": {
"add_choice": "Add a choice",
"expires": {
"5_minutes": "5 minutes",
"30_minutes": "30 minutes",
"1_hour": "1 hour",
"6_hours": "6 hours",
"1_day": "1 day",
"3_days": "3 days",
"7_days": "7 days"
}
}
},
"report": {
"title": "Reporting this user",
"comment": "Additional comments",
"cancel": "Cancel",
"ok": "Report"
},
"shortcut": {
"ctrl_r": "Reload current timeline",
"h": "Switch the focus to left column",
"l": "Switch the focus to right column",
"?": "Show this help"
}
},
"preferences": {
"general": {
"timeline": {
"title": "Timeline",
"description": "Customize view in your timelines.",
"cw": "Always ignore contents warnings",
"nfsw": "Always ignore NFSW of medias",
"hideAllAttachments": "Hide all medias"
},
"other": {
"title": "Other options",
"launch": "Launch app on login"
}
},
"appearance": {
"toot_padding": "Padding around toot"
},
"network": {
"title": "Network",
"proxy": {
"title": "Proxy Configuration",
"no": "No proxy",
"system": "Use system proxy",
"manual": "Manual proxy configuration",
"protocol": "Protocol",
"host": "Proxy host",
"port": "Proxy port",
"username": "Proxy username",
"password": "Proxy password",
"protocol_list": {
"http": "http",
"https": "https",
"socks4": "socks4",
"socks4a": "socks4a",
"socks5": "socks5",
"socks5h": "socks5h"
}
},
"save": "Save"
}
},
"follow_requests": {
"accept": "Accept",
"reject": "Reject"
},
"cards": {
"toot": {
"poll": {
"vote": "Vote",
"votes_count": "votes",
"until": "until {{datetime}}",
"left": "{{datetime}} left",
"refresh": "Refresh"
}
}
},
"message": {
"follow_request_accept_error": "Failed to accept the request",
"follow_reuqest_reject_error": "failed to reject the request",
"start_all_streamings_error": "Failed to start streaming of {{domain}}",
"domain_doesnt_exist": "Failed to connect {{domain}}, make sure the server URL"
},
"validation": {
"new_toot": {
"poll_invalid": "Invalid poll choices"
}
},
"notification": {
"favourite": {
"title": "Favourite",
"body": "{{username}} favourited your status"
},
"follow": {
"title": "Follow",
"body": "{{username}} is now following you"
},
"reblog": {
"title": "Reblog",
"body": "{{username}} boosted your status"
}
},
"login": {
"proxy_info": "If you want to use proxy server, please setup your proxy in",
"proxy_here": " here"
}
}

View File

@ -1,45 +0,0 @@
{
"modals": {
"shortcut": {
"ctrl_r": "Reload current timeline"
}
},
"preferences": {
"general": {
"other": {
"title": "Other options",
"launch": "Launch app on login"
}
},
"network": {
"title": "Network",
"proxy": {
"title": "Proxy Configuration",
"no": "No proxy",
"system": "Use system proxy",
"manual": "Manual proxy configuration",
"protocol": "Protocol",
"host": "Proxy host",
"port": "Proxy port",
"username": "Proxy username",
"password": "Proxy password",
"protocol_list": {
"http": "http",
"https": "https",
"socks4": "socks4",
"socks4a": "socks4a",
"socks5": "socks5",
"socks5h": "socks5h"
}
},
"save": "Save"
}
},
"login": {
"proxy_info": "If you want to use proxy server, please setup your proxy in",
"proxy_here": " here"
},
"message": {
"domain_doesnt_exist": "Failed to connect {{domain}}, make sure the server URL"
}
}