Skip to content

Commit

Permalink
Meh. Restore all_languages()
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed Aug 10, 2022
1 parent b94f93e commit 762243c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ const path = require("path");
const alert = require("./modules/alert_main");
const colour_choices = require("./modules/colour_choices");
const stringify = require("./modules/stringify");
const {translate} = require("./modules/translate");
const translations = require("./modules/translations");
const {translate, all_languages} = require("./modules/translate");

// --------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -2509,7 +2508,7 @@ function language_choices_submenu() {

let ret = [];

for (let language of Object.keys(translations)) {
for (let language of all_languages()) {
ret.push({
label: language,
type: "checkbox",
Expand Down
6 changes: 5 additions & 1 deletion src/modules/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ function count_all_missing() {
return ret;
}

function all_languages() {
return Object.keys(translations);
}

// Validate dictionaries... (every key should be in the English version)

for (let language of Object.keys(translations)) {
Expand All @@ -81,4 +85,4 @@ for (let language of Object.keys(translations)) {



module.exports = {translate, all_translators, all_strings, missing_keys, count_all_missing};
module.exports = {translate, all_translators, all_strings, missing_keys, count_all_missing, all_languages};

0 comments on commit 762243c

Please sign in to comment.