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({
editmod: {
save$core: "save",
cancel$core: "unknown",
save$core: "save$core",
cancel$core: "cancel$core",
}
});

View File

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