Minor updates to string helper

This commit is contained in:
PMKuipers 2023-06-16 23:11:43 +02:00
parent 039d3fbf55
commit 73f4646121
2 changed files with 4 additions and 3 deletions

View File

@ -17,8 +17,8 @@ export default {
let strings = load_strings({ let strings = load_strings({
editmod: { editmod: {
save$core: "save", save$core: "save$core",
cancel$core: "unknown", cancel$core: "cancel$core",
} }
}); });

View File

@ -8,7 +8,8 @@ import {get_strings} from 'core/str';
export function load_strings(strings){ export function load_strings(strings){
for(let idx in strings){ for(let idx in strings){
let stringkeys = []; let stringkeys = [];
for(const key in strings[idx]){ for(const handle in strings[idx]){
const key = strings[idx][handle];
let parts = key.split("$"); let parts = key.split("$");
let identifier = parts[0]; let identifier = parts[0];
let component = (parts.length > 1)?parts[1]:'local_treestudyplan'; let component = (parts.length > 1)?parts[1]:'local_treestudyplan';