From 73f464612136bd5912cc2b61b46e99837e8d2903 Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Fri, 16 Jun 2023 23:11:43 +0200 Subject: [PATCH] Minor updates to string helper --- amd/src/modedit-modal.js | 4 ++-- amd/src/string-helper.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/amd/src/modedit-modal.js b/amd/src/modedit-modal.js index 3199442..0138264 100644 --- a/amd/src/modedit-modal.js +++ b/amd/src/modedit-modal.js @@ -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", } }); diff --git a/amd/src/string-helper.js b/amd/src/string-helper.js index 285272c..d14535d 100644 --- a/amd/src/string-helper.js +++ b/amd/src/string-helper.js @@ -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';