1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-22 16:17:29 +00:00

add language_dev constant

this constant, if enabled, will display MISSING STRING: string_id
if disabled, it will display the english version of string string_id
This commit is contained in:
bopol 2020-11-14 12:29:10 +01:00 committed by Cadence Ember
parent bb652639cf
commit 40eeab8435
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
9 changed files with 20 additions and 1 deletions

View File

@ -1,5 +1,7 @@
const data = {...require("./base")} const data = {...require("./base")}
const {pug} = require("./utils/functions") const {pug} = require("./utils/functions")
const constants = require("../lib/constants")
if (!constants.language_dev) Object.assign(data, require("./en.js"))
;(() => { ;(() => {
data.meta_direction = "ltr" data.meta_direction = "ltr"

View File

@ -1,5 +1,7 @@
const data = {...require("./base")} const data = {...require("./base")}
const {pug} = require("./utils/functions") const {pug} = require("./utils/functions")
const constants = require("../lib/constants")
if (!constants.language_dev) Object.assign(data, require("./en.js"))
;(() => { ;(() => {
data.meta_direction = "ltr" data.meta_direction = "ltr"

View File

@ -1,5 +1,7 @@
const data = {...require("./base")} const data = {...require("./base")}
const {pug} = require("./utils/functions") const {pug} = require("./utils/functions")
const constants = require("../lib/constants")
if (!constants.language_dev) Object.assign(data, require("./en.js"))
;(() => { ;(() => {
data.meta_direction = "rtl" data.meta_direction = "rtl"

View File

@ -1,5 +1,7 @@
const data = {...require("./base")} const data = {...require("./base")}
const {pug} = require("./utils/functions") const {pug} = require("./utils/functions")
const constants = require("../lib/constants")
if (!constants.language_dev) Object.assign(data, require("./en.js"))
;(() => { ;(() => {
data.meta_direction = "ltr" data.meta_direction = "ltr"

View File

@ -1,5 +1,7 @@
const data = {...require("./base")} const data = {...require("./base")}
const {pug} = require("./utils/functions") const {pug} = require("./utils/functions")
const constants = require("../lib/constants")
if (!constants.language_dev) Object.assign(data, require("./en.js"))
;(() => { ;(() => {
data.meta_direction = "ltr" data.meta_direction = "ltr"

View File

@ -1,5 +1,7 @@
const data = {...require("./base")} const data = {...require("./base")}
const {pug} = require("./utils/functions") const {pug} = require("./utils/functions")
const constants = require("../lib/constants")
if (!constants.language_dev) Object.assign(data, require("./en.js"))
;(() => { ;(() => {
data.meta_direction = "ltr" data.meta_direction = "ltr"

View File

@ -1,5 +1,7 @@
const data = {...require("./base")} const data = {...require("./base")}
const {pug} = require("./utils/functions") const {pug} = require("./utils/functions")
const constants = require("../lib/constants")
if (!constants.language_dev) Object.assign(data, require("./en.js"))
;(() => { ;(() => {
data.meta_direction = "ltr" data.meta_direction = "ltr"

View File

@ -1,5 +1,7 @@
const data = {...require("./base")} const data = {...require("./base")}
const {pug} = require("./utils/functions") const {pug} = require("./utils/functions")
const constants = require("../lib/constants")
if (!constants.language_dev) Object.assign(data, require("./en.js"))
;(() => { ;(() => {
data.meta_direction = "ltr" data.meta_direction = "ltr"

View File

@ -290,7 +290,10 @@ let constants = {
additional_routes: [], additional_routes: [],
database_version: 10, database_version: 10,
actually_backup_on_database_upgrade: true actually_backup_on_database_upgrade: true,
// enable this to display: "MISSING STRING: string_id" instead of the English version for all untranslated strings
language_dev: false
} }
// Override values from config and export the result // Override values from config and export the result