@bigbinary/neeto-playwright-commons 7.0.4 → 7.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4143,10 +4143,13 @@ const loadRailsTranslations = () => {
|
|
|
4143
4143
|
]));
|
|
4144
4144
|
};
|
|
4145
4145
|
// Loaded once per worker, in its own namespace so Rails keys can't clash with t.
|
|
4146
|
+
const ensureRailsTranslations = (i18n) => {
|
|
4147
|
+
if (i18n.hasResourceBundle(ENGLISH_LOCALE, RAILS_NAMESPACE))
|
|
4148
|
+
return;
|
|
4149
|
+
Object.entries(loadRailsTranslations()).forEach(([locale, translations]) => i18n.addResourceBundle(locale, RAILS_NAMESPACE, translations));
|
|
4150
|
+
};
|
|
4151
|
+
// Loads on the first railsT call, so tests that never use it don't need the gems.
|
|
4146
4152
|
const getRailsT = (i18n = getI18nInstance()) => {
|
|
4147
|
-
if (!i18n.hasResourceBundle(ENGLISH_LOCALE, RAILS_NAMESPACE)) {
|
|
4148
|
-
Object.entries(loadRailsTranslations()).forEach(([locale, translations]) => i18n.addResourceBundle(locale, RAILS_NAMESPACE, translations));
|
|
4149
|
-
}
|
|
4150
4153
|
const fixedT = i18n.getFixedT(ENGLISH_LOCALE, RAILS_NAMESPACE);
|
|
4151
4154
|
const { locales } = getTranslationsConfig();
|
|
4152
4155
|
// A requested es-MX the app doesn't ship falls back to es, as in Rails.
|
|
@@ -4154,6 +4157,7 @@ const getRailsT = (i18n = getI18nInstance()) => {
|
|
|
4154
4157
|
((locales === "all" || locales.includes(lng)) &&
|
|
4155
4158
|
i18n.hasResourceBundle(lng.split("-")[0], RAILS_NAMESPACE));
|
|
4156
4159
|
return ((key, options = {}) => {
|
|
4160
|
+
ensureRailsTranslations(i18n);
|
|
4157
4161
|
if (options.lng && !isLoaded(options.lng)) {
|
|
4158
4162
|
throw new Error(`Rails translations for "${options.lng}" aren't loaded. Add it to translationsConfig.locales, or check that the app ships it in config/locales.`);
|
|
4159
4163
|
}
|
|
@@ -6488,7 +6492,7 @@ class AuditLogsPage {
|
|
|
6488
6492
|
? `${this.admin} connected ${data.integrationName} using ${data.detail}.`
|
|
6489
6493
|
: `${this.admin} connected ${data.integrationName}.`,
|
|
6490
6494
|
[ACTIONS.disconnectedIntegration]: (data) => data.detail
|
|
6491
|
-
? `${this.admin} disconnected ${data.integrationName}
|
|
6495
|
+
? `${this.admin} disconnected ${data.integrationName} (${data.detail}).`
|
|
6492
6496
|
: `${this.admin} disconnected ${data.integrationName}.`,
|
|
6493
6497
|
};
|
|
6494
6498
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-playwright-commons",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.6",
|
|
4
4
|
"description": "A package encapsulating common playwright code across neeto projects.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-playwright-commons.git",
|
|
6
6
|
"license": "apache-2.0",
|