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: CODE_OF_CONDUCT.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,7 @@ This Code of Conduct applies within all project spaces, and it also applies when
34
34
35
35
## Enforcement
36
36
37
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [daniel@roe.dev](mailto:daniel@roe.dev). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
-
39
-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
37
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project stewards (`@danielroe` and `@patak.dev`) by DM in our [community chat](https://chat.npmx.dev). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The stewards are obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+50-18Lines changed: 50 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -256,31 +256,63 @@ The [config/i18n.ts](./config/i18n.ts) configuration file will be used to regist
256
256
-`locales` object will be used to link the supported locales (country and single one)
257
257
-`buildLocales` function will build the target locales
258
258
259
-
To register a new locale:
259
+
To add a new locale:
260
+
261
+
1. Create a new JSON file in [`i18n/locales/`](./i18n/locales) with the locale code as the filename (e.g., `uk-UA.json`, `de-DE.json`)
262
+
2. Copy [`en.json`](./i18n/locales/en.json) and translate the strings
263
+
3. Add the locale to the `locales` array in [config/i18n.ts](./config/i18n.ts):
260
264
261
-
- for a single country, your JSON file should include the language and the country in the name (for example, `pl-PL.json`) and register the info at `locales` object
262
-
- for multiple country variants, you need to add the default language JSON file (for example for Spanish, `es.json`) and one of the country variants (for example for Spanish for Spain, `es-ES.json`); register the language at `countryLocaleVariants` object adding the country variants with the JSON country file and register the language at `locales` object using the language JSON file (check how we register `es`, `es-ES` and `es-419` in [config/i18n.ts](./config/i18n.ts))
265
+
```typescript
266
+
{
267
+
code: 'uk-UA', // Must match the filename (without .json)
268
+
file: 'uk-UA.json',
269
+
name: 'Українська', // Native name of the language
270
+
},
271
+
```
263
272
264
-
The country file should contain will contain only the translations that differ from the language JSON file, Vue I18n will merge the messages for us.
273
+
4. Copy your translation file to `lunaria/files/`for translation tracking:
> This file must be committed. Lunaria uses git history to track translation progress, so the build will fail if this file is missing.
267
281
268
-
1. Add a new file at [locales](./i18n/locales) folder with the language code as the filename.
269
-
2. Copy [en](./i18n/locales/en.json) and translate the strings
270
-
3. Add the language to the `locales` array in [config/i18n.ts](./config/i18n.ts), below `en` and `ar`:
271
-
- If your language has multiple country variants, add the generic one for language only (only if there are a lot of common entries, you can always add it as a new one)
272
-
- Add all country variants in [country variants object](./config/i18n.ts)
273
-
- Add all country variants files with empty `messages` object: `{}`
274
-
- Translate the strings in the generic language file
275
-
- Later, when anyone wants to add the corresponding translations for the country variant, just override any entry in the corresponding file: you can see an example with `es` variants.
276
-
- If the generic language already exists:
277
-
- If the translation doesn't differ from the generic language, then add the corresponding translations in the corresponding file
278
-
- If the translation differs from the generic language, then add the corresponding translations in the corresponding file and remove it from the country variants entry
279
-
4. If the language is `right-to-left`, add `dir` option with `rtl` value, for example, for [ar](./config/i18n.ts)
280
-
5. If the language requires special pluralization rules, add `pluralRule` callback option, for example, for [ar](./config/i18n.ts)
282
+
5. If the language is `right-to-left`, add `dir: 'rtl'` (see `ar-EG` in config for example)
283
+
6. If the language requires special pluralization rules, add a `pluralRule` callback (see `ar-EG` or `ru-RU` in config for examples)
281
284
282
285
Check [Pluralization rule callback](https://vue-i18n.intlify.dev/guide/essentials/pluralization.html#custom-pluralization) for more info.
283
286
287
+
### Update translation
288
+
289
+
We track the current progress of translations with [Lunaria](https://lunaria.dev/) on this site: https://i18n.npmx.dev/
290
+
If you see any outdated translations in your language, feel free to update the keys to match then English version.
291
+
292
+
In order to make sure you have everything up-to-date, you can run:
293
+
294
+
```bash
295
+
pnpm i18n:check <country-code>
296
+
```
297
+
298
+
For example to check if all Japanese translation keys are up-to-date, run:
299
+
300
+
```bash
301
+
pnpm i18n:check ja-JP
302
+
```
303
+
304
+
#### Country variants (advanced)
305
+
306
+
Most languages only need a single locale file. Country variants are only needed when you want to support regional differences (e.g., `es-ES` for Spain vs `es-419` for Latin America).
307
+
308
+
If you need country variants:
309
+
310
+
1. Create a base language file (e.g., `es.json`) with all translations
311
+
2. Create country variant files (e.g., `es-ES.json`, `es-419.json`) with only the differing translations
312
+
3. Register the base language in `locales` and add variants to `countryLocaleVariants`
313
+
314
+
See how `es`, `es-ES`, and `es-419` are configured in [config/i18n.ts](./config/i18n.ts) for a complete example.
315
+
284
316
### Adding translations
285
317
286
318
1. Add your translation key to `i18n/locales/en.json` first (American English is the source of truth)
This document outlines the governance model for npmx. This includes descriptions of different roles, nomination processes, code review processes, and Code of Conduct enforcement.
4
+
5
+
**All community members must follow the [Code of Conduct (CoC)](CODE_OF_CONDUCT.md).**
6
+
7
+
## Get Involved
8
+
9
+
**Anything that supports the npmx community is a valuable contribution!**
10
+
11
+
All types of contribution are meaningful. This can include code changes, type fixes, Discord activity, and even posting about npmx to your personal blog. No contribution is too small!
12
+
13
+
Anyone can become an npmx contributor. Engineering ability is not required. Our goal is to recognize all contributors to the project regardless of skill, experience or background.
14
+
15
+
## Roles
16
+
17
+
Each contributor role comes with a set of privileges and responsibilities, and they are granted for as long as the individual wishes to engage with the project. Contributors can voluntarily leave the project at any time.
18
+
19
+
### Contributor
20
+
21
+
Have you done something (big or small) to contribute to the health, success, or growth of npmx? Congratulations, you're officially recognized as a **Contributor** to the project! Examples of recognized contributions are helping on the repo, chat, and social. But also blogging, podcasting, and livestreaming about npmx.
22
+
23
+
This role does not require any extra responsibilities nor time commitment. We hope you stick around and keep participating in our community!
24
+
25
+
### Maintainer
26
+
27
+
The **Maintainer** role is available to contributors who want to join the team and take part in the long-term maintenance and growth of npmx. This role is critical to the long-term health of npmx. Maintainers act as the first line of defense when it comes to new issues, pull requests and chat activity.
28
+
29
+
Maintainers are not required to write code! Some Maintainers spend most of their time inside of our chat, maintaining a healthy community there. Others work on technical documentation, support, or design. There is no strict minimum number of contributions needed to reach this level, as long as you can show sustained involvement over time.
30
+
31
+
### Core
32
+
33
+
The **Core** role is available to community members who have a larger-than-usual impact on the npmx project and community. They are seen as leaders in the project and are listened to by the wider npmx community, often before they have even reached this level. A Core member is recognized for contributing a significant amount of time and energy to the project through issues, pull requests, bug fixes, implementing advanced features, or actively posting on our chat.
34
+
35
+
Not every contributor will reach this level, and that's okay! Maintainers still have significant responsibility and privileges within our community.
36
+
37
+
### Project Steward
38
+
39
+
**Stewards** control and maintain sensitive project asset and assist in shaping the direction and vision of the project. We aim to act with consensus within the core team, but stewards can resolve disagreements when needed. Stewards act in the project's best interest and should be an example for the rest of the community. New Stewards are added based on a unanimous vote by the existing Stewards.
Inspired by [Astro](https://github.com/withastro/.github/blob/main/GOVERNANCE.md), [ESLint](https://eslint.org/docs/6.0.0/maintainer-guide/governance), [Rome](https://github.com/rome/tools/blob/203b8efaf3ff087e82b97c484dedc5b5c5f15bcd/GOVERNANCE.md) and [Blitz](https://blitzjs.com/docs/maintainers).
0 commit comments