diff --git a/.changeset/twelve-pillows-search.md b/.changeset/twelve-pillows-search.md new file mode 100644 index 0000000..3817c70 --- /dev/null +++ b/.changeset/twelve-pillows-search.md @@ -0,0 +1,5 @@ +--- +"obsidian-modules": patch +--- + +Improve error message for unresolved module and loading timeout. ([GH#12](https://github.com/polyipseity/obsidian-modules/pull/12) by [@mnaoumov](https://github.com/mnaoumov)) diff --git a/assets/locales/af/translation.json b/assets/locales/af/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/af/translation.json +++ b/assets/locales/af/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/am/translation.json b/assets/locales/am/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/am/translation.json +++ b/assets/locales/am/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ar/translation.json b/assets/locales/ar/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ar/translation.json +++ b/assets/locales/ar/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/be/translation.json b/assets/locales/be/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/be/translation.json +++ b/assets/locales/be/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/bg/translation.json b/assets/locales/bg/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/bg/translation.json +++ b/assets/locales/bg/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/bn/translation.json b/assets/locales/bn/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/bn/translation.json +++ b/assets/locales/bn/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ca/translation.json b/assets/locales/ca/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ca/translation.json +++ b/assets/locales/ca/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/cs/translation.json b/assets/locales/cs/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/cs/translation.json +++ b/assets/locales/cs/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/da/translation.json b/assets/locales/da/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/da/translation.json +++ b/assets/locales/da/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/de/translation.json b/assets/locales/de/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/de/translation.json +++ b/assets/locales/de/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/el/translation.json b/assets/locales/el/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/el/translation.json +++ b/assets/locales/el/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/en/translation.json b/assets/locales/en/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/en/translation.json +++ b/assets/locales/en/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/eo/translation.json b/assets/locales/eo/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/eo/translation.json +++ b/assets/locales/eo/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/es/translation.json b/assets/locales/es/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/es/translation.json +++ b/assets/locales/es/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/eu/translation.json b/assets/locales/eu/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/eu/translation.json +++ b/assets/locales/eu/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/fa/translation.json b/assets/locales/fa/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/fa/translation.json +++ b/assets/locales/fa/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/fi/translation.json b/assets/locales/fi/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/fi/translation.json +++ b/assets/locales/fi/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/fr/translation.json b/assets/locales/fr/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/fr/translation.json +++ b/assets/locales/fr/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/gl/translation.json b/assets/locales/gl/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/gl/translation.json +++ b/assets/locales/gl/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/he/translation.json b/assets/locales/he/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/he/translation.json +++ b/assets/locales/he/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/hi/translation.json b/assets/locales/hi/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/hi/translation.json +++ b/assets/locales/hi/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/hu/translation.json b/assets/locales/hu/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/hu/translation.json +++ b/assets/locales/hu/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/id/translation.json b/assets/locales/id/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/id/translation.json +++ b/assets/locales/id/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/it/translation.json b/assets/locales/it/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/it/translation.json +++ b/assets/locales/it/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ja/translation.json b/assets/locales/ja/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ja/translation.json +++ b/assets/locales/ja/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ko/translation.json b/assets/locales/ko/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ko/translation.json +++ b/assets/locales/ko/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/lv/translation.json b/assets/locales/lv/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/lv/translation.json +++ b/assets/locales/lv/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ml/translation.json b/assets/locales/ml/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ml/translation.json +++ b/assets/locales/ml/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ms/translation.json b/assets/locales/ms/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ms/translation.json +++ b/assets/locales/ms/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/nl/translation.json b/assets/locales/nl/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/nl/translation.json +++ b/assets/locales/nl/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/no/translation.json b/assets/locales/no/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/no/translation.json +++ b/assets/locales/no/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/oc/translation.json b/assets/locales/oc/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/oc/translation.json +++ b/assets/locales/oc/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/pl/translation.json b/assets/locales/pl/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/pl/translation.json +++ b/assets/locales/pl/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/pt-BR/translation.json b/assets/locales/pt-BR/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/pt-BR/translation.json +++ b/assets/locales/pt-BR/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/pt/translation.json b/assets/locales/pt/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/pt/translation.json +++ b/assets/locales/pt/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ro/translation.json b/assets/locales/ro/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ro/translation.json +++ b/assets/locales/ro/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ru/translation.json b/assets/locales/ru/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ru/translation.json +++ b/assets/locales/ru/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/se/translation.json b/assets/locales/se/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/se/translation.json +++ b/assets/locales/se/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/sk/translation.json b/assets/locales/sk/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/sk/translation.json +++ b/assets/locales/sk/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/sq/translation.json b/assets/locales/sq/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/sq/translation.json +++ b/assets/locales/sq/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/sr/translation.json b/assets/locales/sr/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/sr/translation.json +++ b/assets/locales/sr/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ta/translation.json b/assets/locales/ta/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ta/translation.json +++ b/assets/locales/ta/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/te/translation.json b/assets/locales/te/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/te/translation.json +++ b/assets/locales/te/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/th/translation.json b/assets/locales/th/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/th/translation.json +++ b/assets/locales/th/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/tr/translation.json b/assets/locales/tr/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/tr/translation.json +++ b/assets/locales/tr/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/uk/translation.json b/assets/locales/uk/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/uk/translation.json +++ b/assets/locales/uk/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/ur/translation.json b/assets/locales/ur/translation.json index 22e39f0..d8dee50 100644 --- a/assets/locales/ur/translation.json +++ b/assets/locales/ur/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "Reload $t(generic.startup-module_other)" }, "errors": { + "could-not-resolve-module": "Could not resolve $t(generic.module): {{id}}", "error-loading-module": "Error loading $t(generic.module): {{id}}", - "no-functions-exported": "No functions exported" + "no-functions-exported": "No functions exported", + "timeout-loading-module": "$t(generic.timeout, capitalize) loading $t(generic.module): {{id}}" }, "generic": { "case-insensitive": "case-insensitive", diff --git a/assets/locales/zh-Hans/translation.json b/assets/locales/zh-Hans/translation.json index 6f011b8..f7e78bb 100644 --- a/assets/locales/zh-Hans/translation.json +++ b/assets/locales/zh-Hans/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "重新加载$t(generic.startup-module)" }, "errors": { + "could-not-resolve-module": "无法解析$t(generic.module):{{id}}", "error-loading-module": "加载$t(generic.module)时出错:{{id}}", - "no-functions-exported": "没有导出函数" + "no-functions-exported": "没有导出函数", + "timeout-loading-module": "加载$t(generic.module)时$t(generic.timeout):{{id}}" }, "generic": { "case-insensitive": "不区分大小写", diff --git a/assets/locales/zh-Hant/translation.json b/assets/locales/zh-Hant/translation.json index 8557f5e..956c3c9 100644 --- a/assets/locales/zh-Hant/translation.json +++ b/assets/locales/zh-Hant/translation.json @@ -7,8 +7,10 @@ "reload-startup-modules": "重新載入$t(generic.startup-module)" }, "errors": { - "error-loading-module": "載入$t(generic.module)時出錯: {{id}}", - "no-functions-exported": "沒有導出函數" + "could-not-resolve-module": "無法解析$t(generic.module):{{id}}", + "error-loading-module": "載入$t(generic.module)時出錯:{{id}}", + "no-functions-exported": "沒有導出函數", + "timeout-loading-module": "載入$t(generic.module)時$t(generic.timeout):{{id}}" }, "generic": { "case-insensitive": "不區分大小寫", diff --git a/sources/require/require.ts b/sources/require/require.ts index bf31198..c67a55c 100644 --- a/sources/require/require.ts +++ b/sources/require/require.ts @@ -129,7 +129,12 @@ function createRequire( id: string, resolved: Resolved | null, ): readonly [Resolved, ModuleCache] { - if (!resolved) { throw new Error(id) } + if (!resolved) { + throw new Error(ctx.language.value.t("errors.could-not-resolve-module", { + id, + interpolation: { escapeValue: false }, + })) + } const { id: id2 } = resolved, { aliased, aliases, cache } = self2, oldID = aliased.get(id) @@ -350,7 +355,13 @@ function createRequire( : [ (async (): Promise => { await sleep2(self0, importTimeout) - throw new Error(id) + throw new Error(ctx.language.value.t( + "errors.timeout-loading-module", + { + id, + interpolation: { escapeValue: false }, + }, + )) })(), ], ])