| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- var langs = /** @type {const} */ ([
- 'en', 'zh-cn',
- ])
- /** @type {StringDict<LangDict<string>>} */
- var strings = {
- layout: {
- title: {
- en: 'NaiveBoom - Relatively Safe',
- 'zh-cn': 'NaiveBoom - 比较安全',
- },
- info: {
- en: "<b>Gosh!</b> You disabled JavaScript, please enable. <br> Otherwise this site won't work.",
- 'zh-cn': '<b>上帝啊!</b> 您禁用了JavaScript,请开启它 <br> 如果您禁止使用JavaScript,将无法使用我们的服务!',
- },
- guide: {
- en: "<a href='https://www.enablejavascript.io/en' target='_blank' class='alert-link'>Find out how to enable JavaScript.</a>",
- 'zh-cn': "<a href='https://www.enablejavascript.io/cn' target='_blank' class='alert-link'>查看如何启用JavaScript</a>",
- },
- homepage: {
- en: 'Home Page',
- 'zh-cn': '首页',
- },
- },
- error: {
- title: {
- en: 'NaiveBoom - Error',
- 'zh-cn': 'NaiveBoom - 出现错误',
- },
- info: {
- en: 'An error occurred on this page.',
- 'zh-cn': '出现了一些情况,页面发生错误了。',
- },
- },
- index: {
- prompt: {
- en: "<p class='lead'>Anonymous Single-View Message</p>"
- + '<p>Type or paste something in the editor below,'
- + '<br>then press <u><b>Generate</b></u> to get a short link.</p>'
- + '<p>Share this link with your friend, and they only get to open it once,'
- + '<br>when they close the page, the message will be gone <b>forever</b>!</p>',
- 'zh-cn': "<p class='lead'>无需注册的阅后即焚</p>"
- + '<p>在下面的框框里输入或粘贴一些内容'
- + '<br>然后点一下「生成」按钮,你就会得到一个短的网址</p>'
- + '<p>将这个网址发给你的朋友,TA只能看一次'
- + '<br>关掉页面后,内容就会 <b>永远消失</b>! </p>',
- },
- shareprompt: {
- en: 'Share this message with this link:',
- 'zh-cn': '可以把这个网址分享给你的朋友:',
- },
- generate: {
- en: 'Generate',
- 'zh-cn': '生成',
- },
- info: {
- en: "<h6>Naiveboom - Avoid naivetés"
- + "<a href='//en.wikipedia.org/wiki/Moha_(meme)' target='_blank' > <sup>[1]</sup></a></h6><p></p>"
- + '<p>Want to share a message but have concerns with it being exposed to 3<sup>rd</sup> parties?</p>'
- + '<p>Just paste it here (Markdown syntax and attachments supported),'
- + '<br>then generate a single-use link that invalidates itself after opening.</p>'
- + '<p>Now at the very least you would know when things goes wrong.</p>',
- 'zh-cn': '<h6>Naiveboom - 让Naive的事情不再发生</h6><p></p>'
- + '<p>举例:你有一段较为私密的信息需要发送,不想被第三者看到</p>'
- + '<p>你可以将这段文字粘贴到这个页面(支持Markdown格式和附件)'
- + '<br>产生一个一次性链接,阅后即焚</p>'
- + '<p>这样如果出事的话,至少你们能知道(笑)</p>',
- },
- '<close>': {
- en: 'Close',
- 'zh-cn': '关闭',
- },
- '<info>': {
- en: 'Info',
- 'zh-cn': '提示',
- },
- '<error>': {
- en: 'Error',
- 'zh-cn': '错误',
- },
- '<none>': {
- en: '(None)',
- 'zh-cn': '(空)',
- },
- '<loading>': {
- en: 'Loading...',
- 'zh-cn': '加载中...',
- },
- '<failed>': {
- en: 'Failed to perform action:',
- 'zh-cn': '操作失败!',
- },
- '<neterr>': {
- en: 'Network error',
- 'zh-cn': '网络错误',
- },
- '<unknerr>': {
- en: 'Unknown error',
- 'zh-cn': '未知错误',
- },
- },
- look: {
- info: {
- en: 'Uh oh 😯, the message is already gone...',
- 'zh-cn': '啊喔😯,你要查看的内容已经不见了...',
- },
- tips: {
- en: '<p>This means it has already been opened once, and the message was deleted from server.</p>'
- + '<p>Get it? This link is <b>single-use only!</b><p>',
- 'zh-cn': '<p>这是因为这个网址已经被看过一次了,被看过一次的内容就会自动消失</p>'
- + '<p>对,这就是人们常说的 <b>阅后即焚!</b></p>',
- },
- metoo: {
- en: 'I want to get a link too!',
- 'zh-cn': '我也要生成一个!',
- },
- retrieving: {
- en: 'Retrieving message...',
- 'zh-cn': '正在获取...',
- },
- }
- }
- /**
- * @template T
- * @typedef {{ [file: string]: { [key: string]: T } }} StringDict
- */
- /**
- * @template T
- * @typedef {{ [k in typeof langs[number]]: T }} LangDict
- */
- /** @type {LangDict<StringDict<string>>} */
- var langStrings = {}
- langs.forEach(function (lang) {
- langStrings[lang] = {}
- Object.keys(strings).forEach(function(file) {
- langStrings[lang][file] = {}
- Object.keys(strings[file]).forEach(function(key) {
- langStrings[lang][file][key] = strings[file][key][lang];
- })
- });
- });
- module.exports = langStrings
|