web: activate pseudo-locale using querystring
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		| @ -30,7 +30,7 @@ export const SIDEBAR_ITEMS: SidebarItem[] = [ | |||||||
|     ).when((): Promise<boolean> => { |     ).when((): Promise<boolean> => { | ||||||
|         return me().then(u => u.user.isSuperuser||false); |         return me().then(u => u.user.isSuperuser||false); | ||||||
|     }), |     }), | ||||||
|     new SidebarItem(`Events`).children( |     new SidebarItem(t`Events`).children( | ||||||
|         new SidebarItem(t`Logs`, "/events/log").activeWhen( |         new SidebarItem(t`Logs`, "/events/log").activeWhen( | ||||||
|             `^/events/log/(?<id>${UUID_REGEX})$` |             `^/events/log/(?<id>${UUID_REGEX})$` | ||||||
|         ), |         ), | ||||||
|  | |||||||
| @ -1,17 +1,14 @@ | |||||||
| import { i18n } from "@lingui/core"; | import { i18n } from "@lingui/core"; | ||||||
| import { en } from "make-plural/plurals"; | import { en } from "make-plural/plurals"; | ||||||
| import { messages as localeEN } from "../locales/en"; | import { messages as localeEN } from "../locales/en"; | ||||||
|  | import { messages as localeDEBUG } from "../locales/pseudo-LOCALE"; | ||||||
|  |  | ||||||
| i18n.loadLocaleData("en", { | i18n.loadLocaleData("en", { plurals: en }); | ||||||
|     plurals: en | i18n.loadLocaleData("debug", { plurals: en }); | ||||||
| }); |  | ||||||
| i18n.load("en", localeEN); | i18n.load("en", localeEN); | ||||||
|  | i18n.load("debug", localeDEBUG); | ||||||
| i18n.activate("en"); | i18n.activate("en"); | ||||||
|  |  | ||||||
| // Uncomment to debug localisation | if (window.location.search.includes("debugLocale")) { | ||||||
| // import { messages as localeDEBUG } from "../locales/pseudo-LOCALE"; |     i18n.activate("debug"); | ||||||
| // i18n.load("debug", localeDEBUG); | } | ||||||
| // i18n.activate("debug"); |  | ||||||
| // i18n.loadLocaleData("debug", { |  | ||||||
| //     plurals: en |  | ||||||
| // }); |  | ||||||
|  | |||||||
| @ -1071,6 +1071,10 @@ msgstr "Evaluate policies when the Stage is present to the user." | |||||||
| msgid "Event {0}" | msgid "Event {0}" | ||||||
| msgstr "Event {0}" | msgstr "Event {0}" | ||||||
|  |  | ||||||
|  | #: src/interfaces/AdminInterface.ts:23 | ||||||
|  | msgid "Events" | ||||||
|  | msgstr "Events" | ||||||
|  |  | ||||||
| #: src/pages/events/EventInfo.ts:129 | #: src/pages/events/EventInfo.ts:129 | ||||||
| #: src/pages/events/EventInfo.ts:152 | #: src/pages/events/EventInfo.ts:152 | ||||||
| msgid "Exception" | msgid "Exception" | ||||||
|  | |||||||
| @ -1067,6 +1067,10 @@ msgstr "" | |||||||
| msgid "Event {0}" | msgid "Event {0}" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
|  | #: src/interfaces/AdminInterface.ts:23 | ||||||
|  | msgid "Events" | ||||||
|  | msgstr "" | ||||||
|  |  | ||||||
| #: src/pages/events/EventInfo.ts:129 | #: src/pages/events/EventInfo.ts:129 | ||||||
| #: src/pages/events/EventInfo.ts:152 | #: src/pages/events/EventInfo.ts:152 | ||||||
| msgid "Exception" | msgid "Exception" | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer