You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: STYLEGUIDE.md
+8-9
Original file line number
Diff line number
Diff line change
@@ -234,22 +234,21 @@ activist is a global platform and must function in countless different regions a
234
234
235
235
Localization keys should be defined based on the file in which they're used within the platform and the content that they refer to (`CONTENT_REFERENCE` below). Please use the following rules as a guide if you find yourself needing to create new localization keys:
236
236
237
-
- Please use the [i18n-check](https://github.com/activist-org/i18n-check)`i18nMap` object for all texts within the frontend
238
-
- This object returns the sequence of object methods as a string and allows the type checker to be used to check key accuracy
239
-
- Ex: Using the `i18nMap` object:
240
-
- ✅ `i18nMap._global.foo`
237
+
- In following [i18n-check](https://github.com/activist-org/i18n-check) standards, please prepend all i18n keys with `i18n`
238
+
- This allows us to check all keys that are in use against those found in the `en-US.json` file
239
+
- ✅ `i18n._global.foo`
241
240
- ❌ `"_global.foo"`
242
241
- Separate directories and references by `.` and PascalCase/camelCase file name components by `_` in keys
243
-
- Ex: `i18nMap.components.landing_splash.CONTENT_REFERENCE` for the `LandingSplash` component
242
+
- Ex: `i18n.components.landing_splash.CONTENT_REFERENCE` for the `LandingSplash` component
244
243
- Even though Nuxt allows for us to nest components in directories, avoid repetition in the directory path used to define the localization key
245
244
- Ex: If you're defining a key within `CardAbout`:
0 commit comments