mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-22 08:07:30 +00:00
Add new strings: quota_left, settings_saved
This commit is contained in:
parent
40eeab8435
commit
31f6c4936b
@ -79,7 +79,9 @@ const data = {
|
|||||||
"t_return": "MISSING STRING: t_return",
|
"t_return": "MISSING STRING: t_return",
|
||||||
"t_save": "MISSING STRING: t_save",
|
"t_save": "MISSING STRING: t_save",
|
||||||
"save_and_return": "MISSING STRING: save_and_return",
|
"save_and_return": "MISSING STRING: save_and_return",
|
||||||
"pug_restore_sync_settings": locals => "MISSING TEMPLATE: pug_restore_sync_settings"
|
"pug_restore_sync_settings": locals => "MISSING TEMPLATE: pug_restore_sync_settings",
|
||||||
|
"settings_saved": "MISSING STRING: settings_saved",
|
||||||
|
"quota_left": "MISSING STRING: quota_left"
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = data
|
module.exports = data
|
||||||
|
@ -45,6 +45,7 @@ const {pug} = require("./utils/functions")
|
|||||||
data.post_counter_label = "posts"
|
data.post_counter_label = "posts"
|
||||||
data.outgoing_follows_counter_label = "following"
|
data.outgoing_follows_counter_label = "following"
|
||||||
data.incoming_follows_counter_label = "followed by"
|
data.incoming_follows_counter_label = "followed by"
|
||||||
|
data.quota_left = "Quota left:"
|
||||||
data.t_home = "Home"
|
data.t_home = "Home"
|
||||||
data.tab_timeline = "Timeline"
|
data.tab_timeline = "Timeline"
|
||||||
data.tab_igtv = "IGTV"
|
data.tab_igtv = "IGTV"
|
||||||
@ -98,6 +99,7 @@ const {pug} = require("./utils/functions")
|
|||||||
data.pug_restore_sync_settings = pug(`
|
data.pug_restore_sync_settings = pug(`
|
||||||
| You can restore and sync saved settings by #[a(href="/applysettings/"+token)#restore-link bookmarking this link.]
|
| You can restore and sync saved settings by #[a(href="/applysettings/"+token)#restore-link bookmarking this link.]
|
||||||
`)
|
`)
|
||||||
|
data.settings_saved = "Saved."
|
||||||
|
|
||||||
})()
|
})()
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ if (!constants.language_dev) Object.assign(data, require("./en.js"))
|
|||||||
data.post_counter_label = "posts"
|
data.post_counter_label = "posts"
|
||||||
data.outgoing_follows_counter_label = "abonnements"
|
data.outgoing_follows_counter_label = "abonnements"
|
||||||
data.incoming_follows_counter_label = "abonnés"
|
data.incoming_follows_counter_label = "abonnés"
|
||||||
|
data.quota_left = "Quota restant :"
|
||||||
data.t_home = "Accueil"
|
data.t_home = "Accueil"
|
||||||
data.tab_timeline = "Publications"
|
data.tab_timeline = "Publications"
|
||||||
data.tab_igtv = "IGTV"
|
data.tab_igtv = "IGTV"
|
||||||
@ -100,6 +101,7 @@ if (!constants.language_dev) Object.assign(data, require("./en.js"))
|
|||||||
data.pug_restore_sync_settings = pug(`
|
data.pug_restore_sync_settings = pug(`
|
||||||
| Vous pouvez sauvegarder et synchroniser vos préférences sauvegardées en #[a(href="/applysettings/"+token)#restore-link ajoutant ce lien à vos favoris.]
|
| Vous pouvez sauvegarder et synchroniser vos préférences sauvegardées en #[a(href="/applysettings/"+token)#restore-link ajoutant ce lien à vos favoris.]
|
||||||
`)
|
`)
|
||||||
|
data.settings_saved = "Sauvegardé."
|
||||||
|
|
||||||
})()
|
})()
|
||||||
|
|
||||||
|
@ -88,4 +88,6 @@ display_alt_text
|
|||||||
t_return
|
t_return
|
||||||
t_save
|
t_save
|
||||||
save_and_return
|
save_and_return
|
||||||
pug_restore_sync_settings
|
pug_restore_sync_settings
|
||||||
|
settings_saved
|
||||||
|
quota_left
|
@ -1,4 +1,5 @@
|
|||||||
const constants = require("../../lib/constants")
|
const constants = require("../../lib/constants")
|
||||||
|
const lang = require("../../lang")
|
||||||
const {render, redirect} = require("pinski/plugins")
|
const {render, redirect} = require("pinski/plugins")
|
||||||
const {getSettings, getToken, generateCSRF, checkCSRF} = require("./utils/getsettings")
|
const {getSettings, getToken, generateCSRF, checkCSRF} = require("./utils/getsettings")
|
||||||
const {getSettingsReferrer} = require("./utils/settingsreferrer")
|
const {getSettingsReferrer} = require("./utils/settingsreferrer")
|
||||||
@ -73,9 +74,10 @@ module.exports = [
|
|||||||
if (action === "return" && url.searchParams.has("referrer")) {
|
if (action === "return" && url.searchParams.has("referrer")) {
|
||||||
location = url.searchParams.get("referrer")
|
location = url.searchParams.get("referrer")
|
||||||
} else { // stay
|
} else { // stay
|
||||||
|
const ll = lang.get(prepared.language)
|
||||||
const newParams = new URLSearchParams()
|
const newParams = new URLSearchParams()
|
||||||
newParams.append("status", "success")
|
newParams.append("status", "success")
|
||||||
newParams.append("message", "Saved.")
|
newParams.append("message", ll.settings_saved)
|
||||||
if (url.searchParams.has("referrer")) {
|
if (url.searchParams.has("referrer")) {
|
||||||
newParams.append("referrer", url.searchParams.get("referrer"))
|
newParams.append("referrer", url.searchParams.get("referrer"))
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,9 @@ html
|
|||||||
a(href="/")= ll.t_home
|
a(href="/")= ll.t_home
|
||||||
a(href=settingsReferrer)= ll.t_settings
|
a(href=settingsReferrer)= ll.t_settings
|
||||||
if constants.quota.enabled
|
if constants.quota.enabled
|
||||||
.quota Quota left: #[span#quota= remaining]
|
.quota
|
||||||
|
= ll.quota_left
|
||||||
|
| #[span#quota= remaining]
|
||||||
|
|
||||||
- const hasPosts = !user.data.is_private && selectedTimeline.pages.length && selectedTimeline.pages[0].length
|
- const hasPosts = !user.data.is_private && selectedTimeline.pages.length && selectedTimeline.pages[0].length
|
||||||
.timeline-section(dir=ll.meta_direction)
|
.timeline-section(dir=ll.meta_direction)
|
||||||
|
Loading…
Reference in New Issue
Block a user