feat: update all language keys to use - instead of _ (#12059)

* feat: update all language keys to use - instead of _

* refactor: update language keys
This commit is contained in:
Barış Soner Uşaklı
2023-10-05 12:48:50 -04:00
committed by GitHub
parent fb5b8e49fe
commit 844cb91beb
1053 changed files with 19937 additions and 19937 deletions

View File

@@ -32,7 +32,7 @@ categoriesController.get = async function (req, res) {
const payload = {};
payload.categories = categoriesData;
payload.title = `[[pages:account/watched_categories, ${username}]]`;
payload.title = `[[pages:account/watched-categories, ${username}]]`;
payload.breadcrumbs = helpers.buildBreadcrumbs([
{ text: username, url: `/user/${userslug}` },
{ text: '[[pages:categories]]' },

View File

@@ -196,7 +196,7 @@ async function getProfileMenu(uid, callerUID) {
const links = [{
id: 'info',
route: 'info',
name: '[[user:account_info]]',
name: '[[user:account-info]]',
icon: 'fa-info',
visibility: {
self: false,

View File

@@ -38,7 +38,7 @@ infoController.get = async function (req, res) {
payload.pagination = pagination.create(page, pageCount, req.query);
}
payload.title = '[[pages:account/info]]';
payload.breadcrumbs = helpers.buildBreadcrumbs([{ text: username, url: `/user/${userslug}` }, { text: '[[user:account_info]]' }]);
payload.breadcrumbs = helpers.buildBreadcrumbs([{ text: username, url: `/user/${userslug}` }, { text: '[[user:account-info]]' }]);
res.render('account/info', payload);
};

View File

@@ -16,7 +16,7 @@ const postsController = module.exports;
const templateToData = {
'account/bookmarks': {
type: 'posts',
noItemsFoundKey: '[[topic:bookmarks.has_no_bookmarks]]',
noItemsFoundKey: '[[topic:bookmarks.has-no-bookmarks]]',
crumb: '[[user:bookmarks]]',
getSets: function (callerUid, userData) {
return `uid:${userData.uid}:bookmarks`;
@@ -24,7 +24,7 @@ const templateToData = {
},
'account/posts': {
type: 'posts',
noItemsFoundKey: '[[user:has_no_posts]]',
noItemsFoundKey: '[[user:has-no-posts]]',
crumb: '[[global:posts]]',
getSets: async function (callerUid, userData) {
const cids = await categories.getCidsByPrivilege('categories:cid', callerUid, 'topics:read');
@@ -33,7 +33,7 @@ const templateToData = {
},
'account/upvoted': {
type: 'posts',
noItemsFoundKey: '[[user:has_no_upvoted_posts]]',
noItemsFoundKey: '[[user:has-no-upvoted-posts]]',
crumb: '[[global:upvoted]]',
getSets: function (callerUid, userData) {
return `uid:${userData.uid}:upvote`;
@@ -41,7 +41,7 @@ const templateToData = {
},
'account/downvoted': {
type: 'posts',
noItemsFoundKey: '[[user:has_no_downvoted_posts]]',
noItemsFoundKey: '[[user:has-no-downvoted-posts]]',
crumb: '[[global:downvoted]]',
getSets: function (callerUid, userData) {
return `uid:${userData.uid}:downvote`;
@@ -49,7 +49,7 @@ const templateToData = {
},
'account/best': {
type: 'posts',
noItemsFoundKey: '[[user:has_no_best_posts]]',
noItemsFoundKey: '[[user:has-no-best-posts]]',
crumb: '[[global:best]]',
getSets: async function (callerUid, userData) {
const cids = await categories.getCidsByPrivilege('categories:cid', callerUid, 'topics:read');
@@ -68,7 +68,7 @@ const templateToData = {
},
'account/controversial': {
type: 'posts',
noItemsFoundKey: '[[user:has_no_controversial_posts]]',
noItemsFoundKey: '[[user:has-no-controversial-posts]]',
crumb: '[[global:controversial]]',
getSets: async function (callerUid, userData) {
const cids = await categories.getCidsByPrivilege('categories:cid', callerUid, 'topics:read');
@@ -87,7 +87,7 @@ const templateToData = {
},
'account/watched': {
type: 'topics',
noItemsFoundKey: '[[user:has_no_watched_topics]]',
noItemsFoundKey: '[[user:has-no-watched-topics]]',
crumb: '[[user:watched]]',
getSets: function (callerUid, userData) {
return `uid:${userData.uid}:followed_tids`;
@@ -120,7 +120,7 @@ const templateToData = {
},
'account/ignored': {
type: 'topics',
noItemsFoundKey: '[[user:has_no_ignored_topics]]',
noItemsFoundKey: '[[user:has-no-ignored-topics]]',
crumb: '[[user:ignored]]',
getSets: function (callerUid, userData) {
return `uid:${userData.uid}:ignored_tids`;
@@ -128,7 +128,7 @@ const templateToData = {
},
'account/topics': {
type: 'topics',
noItemsFoundKey: '[[user:has_no_topics]]',
noItemsFoundKey: '[[user:has-no-topics]]',
crumb: '[[global:topics]]',
getSets: async function (callerUid, userData) {
const cids = await categories.getCidsByPrivilege('categories:cid', callerUid, 'topics:read');

View File

@@ -53,11 +53,11 @@ settingsController.get = async function (req, res, next) {
userData.disableEmailSubscriptions = meta.config.disableEmailSubscriptions;
userData.dailyDigestFreqOptions = [
{ value: 'off', name: '[[user:digest_off]]', selected: userData.settings.dailyDigestFreq === 'off' },
{ value: 'day', name: '[[user:digest_daily]]', selected: userData.settings.dailyDigestFreq === 'day' },
{ value: 'week', name: '[[user:digest_weekly]]', selected: userData.settings.dailyDigestFreq === 'week' },
{ value: 'biweek', name: '[[user:digest_biweekly]]', selected: userData.settings.dailyDigestFreq === 'biweek' },
{ value: 'month', name: '[[user:digest_monthly]]', selected: userData.settings.dailyDigestFreq === 'month' },
{ value: 'off', name: '[[user:digest-off]]', selected: userData.settings.dailyDigestFreq === 'off' },
{ value: 'day', name: '[[user:digest-daily]]', selected: userData.settings.dailyDigestFreq === 'day' },
{ value: 'week', name: '[[user:digest-weekly]]', selected: userData.settings.dailyDigestFreq === 'week' },
{ value: 'biweek', name: '[[user:digest-biweekly]]', selected: userData.settings.dailyDigestFreq === 'biweek' },
{ value: 'month', name: '[[user:digest-monthly]]', selected: userData.settings.dailyDigestFreq === 'month' },
];
userData.languages.forEach((language) => {