Merge branch 'master' into develop

This commit is contained in:
RiotRobot 2023-03-28 14:30:52 +01:00
commit 0475e7107f
15 changed files with 186 additions and 125 deletions

View file

@ -14,11 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { safeSet } from "matrix-js-sdk/src/utils";
import { TranslationStringsObject } from "@matrix-org/react-sdk-module-api/lib/types/translations";
import { AnyLifecycle } from "@matrix-org/react-sdk-module-api/lib/lifecycles/types";
import { AppModule } from "./AppModule";
import { ModuleFactory } from "./ModuleFactory";
import "./ModuleComponents";
/**
@ -53,9 +55,10 @@ export class ModuleRunner {
if (!i18n) continue;
for (const [lang, strings] of Object.entries(i18n)) {
if (!merged[lang]) merged[lang] = {};
safeSet(merged, lang, merged[lang] || {});
for (const [str, val] of Object.entries(strings)) {
merged[lang][str] = val;
safeSet(merged[lang], str, val);
}
}
}