refactor: split (and remove) activitypub.json file and move strings to more appropriate locations

This commit is contained in:
Julian Lam
2024-12-13 13:34:13 -05:00
parent aa1f65e9bb
commit e4e1063622
7 changed files with 76 additions and 19 deletions

View File

@@ -2439,7 +2439,6 @@ trans.et = public/language/et/themes/persona.json
trans.it = public/language/it/themes/persona.json trans.it = public/language/it/themes/persona.json
trans.rw = public/language/rw/themes/persona.json trans.rw = public/language/rw/themes/persona.json
[o:nodebb:p:nodebb:r:aria] [o:nodebb:p:nodebb:r:aria]
file_filter = public/language/<lang>/aria.json file_filter = public/language/<lang>/aria.json
source_file = public/language/en-GB/aria.json source_file = public/language/en-GB/aria.json
@@ -3923,3 +3922,55 @@ trans.hu = public/language/hu/users.json
trans.lv = public/language/lv/users.json trans.lv = public/language/lv/users.json
trans.pt_BR = public/language/pt-BR/users.json trans.pt_BR = public/language/pt-BR/users.json
[o:nodebb:p:nodebb:r:world]
file_filter = public/language/<lang>/world.json
source_file = public/language/en-GB/world.json
source_lang = en_GB
type = KEYVALUEJSON
trans.zh_TW = public/language/zh-TW/world.json
trans.de = public/language/de/world.json
trans.en@pirate = public/language/en-x-pirate/world.json
trans.ru = public/language/ru/world.json
trans.sc = public/language/sc/world.json
trans.en_US = public/language/en-US/world.json
trans.bn = public/language/bn/world.json
trans.hy = public/language/hy/world.json
trans.ro = public/language/ro/world.json
trans.fi = public/language/fi/world.json
trans.it = public/language/it/world.json
trans.pl = public/language/pl/world.json
trans.sk = public/language/sk/world.json
trans.ar = public/language/ar/world.json
trans.bg = public/language/bg/world.json
trans.el = public/language/el/world.json
trans.fa_IR = public/language/fa-IR/world.json
trans.sq_AL = public/language/sq-AL/world.json
trans.cs = public/language/cs/world.json
trans.he = public/language/he/world.json
trans.ja = public/language/ja/world.json
trans.ko = public/language/ko/world.json
trans.nb = public/language/nb/world.json
trans.nn_NO = public/language/nn-NO/world.json
trans.pt_PT = public/language/pt-PT/world.json
trans.sr = public/language/sr/world.json
trans.zh_CN = public/language/zh-CN/world.json
trans.da = public/language/da/world.json
trans.id = public/language/id/world.json
trans.lt = public/language/lt/world.json
trans.ms = public/language/ms/world.json
trans.nl = public/language/nl/world.json
trans.rw = public/language/rw/world.json
trans.sl = public/language/sl/world.json
trans.th = public/language/th/world.json
trans.es = public/language/es/world.json
trans.fr = public/language/fr/world.json
trans.gl = public/language/gl/world.json
trans.hr = public/language/hr/world.json
trans.uk = public/language/uk/world.json
trans.vi = public/language/vi/world.json
trans.sv = public/language/sv/world.json
trans.tr = public/language/tr/world.json
trans.et = public/language/et/world.json
trans.hu = public/language/hu/world.json
trans.lv = public/language/lv/world.json
trans.pt_BR = public/language/pt-BR/world.json

View File

@@ -7,5 +7,8 @@
"alltime": "All Time", "alltime": "All Time",
"no-recent-topics": "There are no recent topics.", "no-recent-topics": "There are no recent topics.",
"no-popular-topics": "There are no popular topics.", "no-popular-topics": "There are no popular topics.",
"load-new-posts": "Load new posts" "load-new-posts": "Load new posts",
"uncategorized.title": "All known topics",
"uncategorized.intro": "This page shows a chronological listing of every topic that this forum has received.<br />The views and opinions expressed in the topics below are not moderated and may not represent the views and opinions of this website."
} }

View File

@@ -251,5 +251,8 @@
"downvote-post": "Downvote post", "downvote-post": "Downvote post",
"post-tools": "Post tools", "post-tools": "Post tools",
"unread-posts-link": "Unread posts link", "unread-posts-link": "Unread posts link",
"thumb-image": "Topic thumbnail image" "thumb-image": "Topic thumbnail image",
"announcers": "Shares",
"announcers-x": "Shares (%1)"
} }

View File

@@ -1,10 +1,8 @@
{ {
"world.name": "World", "name": "World",
"world.description": "", "popular": "Popular topics",
"world.popular": "Popular topics", "recent": "All topics",
"world.recent": "All topics", "help": "Help",
"world.help": "Help",
"no-topics": "This forum doesn't know of any other topics yet.",
"help.title": "What is this page?", "help.title": "What is this page?",
"help.intro": "Welcome to your corner of the fediverse.", "help.intro": "Welcome to your corner of the fediverse.",
@@ -13,6 +11,8 @@
"help.federating": "Likewise, if users from outside of this forum start following <em>you</em>, then your posts will start appearing on those apps and websites as well.", "help.federating": "Likewise, if users from outside of this forum start following <em>you</em>, then your posts will start appearing on those apps and websites as well.",
"help.next-generation": "This is the next generation of social media, start contributing today!", "help.next-generation": "This is the next generation of social media, start contributing today!",
"announcers": "Shares", "onboard.title": "Your window to the fediverse...",
"announcers-x": "Shares (%1)" "onboard.what": "This is your personalized category made up of only content found outside of this forum. Whether something shows up in this page depends on whether you follow them, or whether that post was shared by someone you follow.",
"onboard.why": "There's a lot that goes on outside of this forum, and not all of it is relevant to your interests. That's why following people is the best way to signal that you want to see more from someone.",
"onboard.how": "In the meantime, you can click on the shortcut buttons at the top to see what else this forum knows about, and start discovering some new content!"
} }

View File

@@ -151,7 +151,7 @@ define('forum/topic/votes', [
const html = await app.parseAndTranslate('modals/announcers', data); const html = await app.parseAndTranslate('modals/announcers', data);
const dialog = bootbox.dialog({ const dialog = bootbox.dialog({
title: `[[activitypub:announcers-x, ${data.announceCount}]]`, title: `[[topic:announcers-x, ${data.announceCount}]]`,
message: html, message: html,
className: 'announce-modal', className: 'announce-modal',
show: true, show: true,

View File

@@ -50,16 +50,16 @@ define('forum/world', ['topicList', 'sort', 'hooks', 'alerts', 'api', 'bootbox']
} }
const content = [ const content = [
'<p class="lead">[[activitypub:help.intro]]</p>', '<p class="lead">[[world:help.intro]]</p>',
'<p>[[activitypub:help.fediverse]]</p>', '<p>[[world:help.fediverse]]</p>',
'<p>[[activitypub:help.build]]</p>', '<p>[[world:help.build]]</p>',
'<p>[[activitypub:help.federating]]</p>', '<p>[[world:help.federating]]</p>',
'<p>[[activitypub:help.next-generation]]</p>', '<p>[[world:help.next-generation]]</p>',
]; ];
trigger.addEventListener('click', () => { trigger.addEventListener('click', () => {
bootbox.dialog({ bootbox.dialog({
title: '[[activitypub:help.title]]', title: '[[world:help.title]]',
message: content.join('\n'), message: content.join('\n'),
size: 'large', size: 'large',
}); });

View File

@@ -66,7 +66,7 @@ controller.list = async function (req, res) {
targetUid: targetUid, targetUid: targetUid,
}; };
const data = await categories.getCategoryById(cidQuery); const data = await categories.getCategoryById(cidQuery);
data.name = '[[activitypub:world.name]]'; data.name = '[[world:name]]';
delete data.children; delete data.children;
const tids = await getTids(cidQuery); const tids = await getTids(cidQuery);