1
0
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:
bopol 2020-11-14 12:30:07 +01:00 committed by Cadence Ember
parent 40eeab8435
commit 31f6c4936b
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
6 changed files with 16 additions and 4 deletions

View File

@ -79,7 +79,9 @@ const data = {
"t_return": "MISSING STRING: t_return",
"t_save": "MISSING STRING: t_save",
"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

View File

@ -45,6 +45,7 @@ const {pug} = require("./utils/functions")
data.post_counter_label = "posts"
data.outgoing_follows_counter_label = "following"
data.incoming_follows_counter_label = "followed by"
data.quota_left = "Quota left:"
data.t_home = "Home"
data.tab_timeline = "Timeline"
data.tab_igtv = "IGTV"
@ -98,6 +99,7 @@ const {pug} = require("./utils/functions")
data.pug_restore_sync_settings = pug(`
| You can restore and sync saved settings by #[a(href="/applysettings/"+token)#restore-link bookmarking this link.]
`)
data.settings_saved = "Saved."
})()

View File

@ -47,6 +47,7 @@ if (!constants.language_dev) Object.assign(data, require("./en.js"))
data.post_counter_label = "posts"
data.outgoing_follows_counter_label = "abonnements"
data.incoming_follows_counter_label = "abonnés"
data.quota_left = "Quota restant :"
data.t_home = "Accueil"
data.tab_timeline = "Publications"
data.tab_igtv = "IGTV"
@ -100,6 +101,7 @@ if (!constants.language_dev) Object.assign(data, require("./en.js"))
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.]
`)
data.settings_saved = "Sauvegardé."
})()

View File

@ -88,4 +88,6 @@ display_alt_text
t_return
t_save
save_and_return
pug_restore_sync_settings
pug_restore_sync_settings
settings_saved
quota_left

View File

@ -1,4 +1,5 @@
const constants = require("../../lib/constants")
const lang = require("../../lang")
const {render, redirect} = require("pinski/plugins")
const {getSettings, getToken, generateCSRF, checkCSRF} = require("./utils/getsettings")
const {getSettingsReferrer} = require("./utils/settingsreferrer")
@ -73,9 +74,10 @@ module.exports = [
if (action === "return" && url.searchParams.has("referrer")) {
location = url.searchParams.get("referrer")
} else { // stay
const ll = lang.get(prepared.language)
const newParams = new URLSearchParams()
newParams.append("status", "success")
newParams.append("message", "Saved.")
newParams.append("message", ll.settings_saved)
if (url.searchParams.has("referrer")) {
newParams.append("referrer", url.searchParams.get("referrer"))
}

View File

@ -96,7 +96,9 @@ html
a(href="/")= ll.t_home
a(href=settingsReferrer)= ll.t_settings
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
.timeline-section(dir=ll.meta_direction)