Skip to content

Commit a6da846

Browse files
authored
Merge pull request #5507 from ethereum/contrib1
update Contributing.md
2 parents 01a2d65 + 9dd89bc commit a6da846

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

CONTRIBUTING.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
11
# Contributing
22

3-
Everyone is very welcome to contribute on the codebase of Remix. Please join our [Discord](https://discord.gg/mh9hFCKkEq) in case of any queries.
3+
Everyone is welcome to contribute to Remix's codebase and please join our [Discord](https://discord.gg/mh9hFCKkEq).
44

55
## Development
6-
Remix libraries work closely with [Remix IDE](https://remix.ethereum.org). Each library has a readme to explain its application.
6+
Remix libraries work closely with [Remix IDE](https://remix.ethereum.org). Each library has a README to explain its application.
77

8-
When you add code in any library, please ensure you add related unit tests.
8+
When you add code to a library, please add related unit tests.
99

1010
## Coding style
1111

12-
Please conform to [standard](https://standardjs.com/) for code styles.
12+
Use [JavaScript Standard Style](https://standardjs.com/) for the coding style.
1313

1414
## Submitting Pull Requests
15-
Please follow GitHub's standard model of making changes & submitting pull request which is very well explained [here](https://guides.github.com/activities/forking/). Make sure your code works fine locally before submitting a pull request.
15+
Follow GitHub's standard model of making changes & submitting pull requests - explained [here](https://guides.github.com/activities/forking/). Please make sure your code works locally before submitting a pull request.
1616

1717
## Internationalization
18-
Remix now supports Internationalization. Everyone is welcome to contribute to this feature.
18+
Remix supports Internationalization.
1919

20-
### How to make a string support intl?
20+
### How to contribute translations?
21+
Remix uses CrowdIn to manage translations. Please DO NOT make a PR on GitHub with translation. To contribute, make an account on [CrowdIn](https://accounts.crowdin.com/register).
22+
23+
Remix has four projects on CrowdIn
24+
1. [RemixUI](https://crowdin.com/project/remix-ui/) - for translating Remix's User Interface
25+
2. [Remix Docs](https://crowdin.com/project/remix-translation) - for translating Remix's [Documentation](https://remix-ide.readthedocs.io)
26+
3. [LearnEth](https://crowdin.com/project/remix-learneth) - for translating the tutorials in Remix's tutorial plugin called [Learneth](https://remix.ethereum.org/?#activate=solidity,solidityUnitTesting,LearnEth)
27+
4. [Remix Project Website](https://crowdin.com/project/361d7e8c3b07220fa22e9d5a901b0021) - for translating the info site about [Remix](https://remix-project.org/)
28+
29+
There are many languages, for each project. But if you do not see your desired language, send us a note on CrowdIn or in the Remix Discord.
30+
31+
In addition to writing translations, you can also review other's work.
32+
33+
### How to make your plugin suport string internationalization?
2134
First, put the string in the locale file located under `apps/remix-ide/src/app/tabs/locales/en`.
2235
Each json file corresponds to a module. If the module does not exist, then create a new json and import it in the `index.js`.
2336
Then you can replace the string with an intl component. The `id` prop will be the key of this string.
@@ -80,34 +93,22 @@ You can find the language's `code, name, localeName` in this link
8093
https://github.com/ethereum/ethereum-org-website/blob/dev/i18n.config.json
8194

8295
### Whether or not to use `defaultMessage`?
83-
If you search `FormattedMessage` or `intl.formatMessage` in this project, you will notice that most of them only have a `id` prop, but a few of them have a `defaultMessage` prop.
96+
If you search `FormattedMessage` or `intl.formatMessage` in this project, you will notice that most only have a `id` prop, but a few of them have a `defaultMessage` prop.
8497

8598
**Why?**
8699

87-
Each non-english language will be filled in the gaps with english. Even though there may be some untranslated content, it will always use english as defaultMessage. That's why we don't need to provide a `defaultMessage` prop each time we render a `FormattedMessage` component.
100+
The gaps in an incomplete non-English language will be filled with English. The un-translated content will use English as defaultMessage. That's why we don't need to provide a `defaultMessage` prop each time we render a `FormattedMessage` component.
88101

89102
But in some cases, the `id` prop may not be static. For example,
90103
```jsx
91104
<h6 className="pt-0 mb-1" data-id='sidePanelSwapitTitle'>
92105
<FormattedMessage id={plugin?.profile.name + '.displayName'} defaultMessage={plugin?.profile.displayName || plugin?.profile.name} />
93106
</h6>
94107
```
95-
You can't be sure whether there is a match key in locale file or not. So it will be better to provide a `defaultMessage` prop.
96-
97-
### Should I update the non-english locale json files?
98-
You probably will have this question when you are updating the english locale json files.
99-
100-
Well, that depends.
101-
102-
If you update an old json file, then you don't need to update it in other languages, because crowdin will do it for you.
103-
104-
But if you add a new json file, only English is needed.
105-
106-
### How to contribute on translations?
107-
Remix is using crowdin to manage translations. If you want to contribute on that, you can do it on crowdin. Check the link below.
108108
109-
https://crowdin.com/project/remix-translation
109+
Because you can't be sure if there is a matched key in the locale file, its better to provide a `defaultMessage` prop.
110110
111-
There are many languages, just get into your language, and you will see a folder named `Remix UI`, where you can do the translations.
111+
### Should I update the non-English locale json files?
112+
When you are updating an existing English locale json file, then you don't need to add any other languages, because CrowdIn will do it for you.
112113
113-
Not only you can do the translations, you can also review it. If you agree or disagree with some translations, you can vote YES or NO. If you vote NO, you can comment to explain why you vote NO, and give your translation.
114+
But if you add a new json file, only then English is needed.

0 commit comments

Comments
 (0)