-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Massive Code Cleanup - pt1 I've noticed that it'd be difficult to just make one big commit, so I'll make more smaller ones * Added README for scripts and locales * Minor big fix * Delete .DS_Store
Showing
7 changed files
with
192 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Adding a New Translation | ||
|
||
1. **Create a new translation file** | ||
- Name the file using the appropriate language code (e.g., `de.js` for German or `ar.js` for Arabic). | ||
- Place this file in the `locales` directory. | ||
|
||
2. **Add the locale to `index.html`** | ||
- Open `index.html` and locate the `<!-- LANGUAGES SCRIPTS -->` section. | ||
- Add your new locale script tag in the correct order, as follows: | ||
```html | ||
<script src="locales/de.js"></script> | ||
``` | ||
|
||
3. **Test the translation** | ||
- Verify that your translations are displayed correctly when the respective locale is selected. | ||
|
||
4. **Keep translations consistent** | ||
- Follow the structure of existing translation files to ensure consistency across all locales. | ||
|
||
5. **Subscribe to Translation Updates for Contributors** (optional) | ||
- Join the #195 channel or mailing list to receive notifications about new lines being added to translations. | ||
|
||
6. **Update the Currently Supported Languages section in the `README.md`** | ||
- Add the new language to the list of supported languages in the README, following the existing format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Contributing to the Project | ||
|
||
## Adding a New Feature | ||
|
||
1. **Create a new script file** | ||
- Name the file appropriately to reflect the feature you're adding. For example, if your feature involves animations, the file could be named `animation-feature.js`. | ||
- Place this new file in the `scripts` directory. | ||
|
||
2. **Include the copyright comment** | ||
- Add the following copyright block at the top of your new script file: | ||
```javascript | ||
/* | ||
* Material You NewTab | ||
* Copyright (c) 2023-2025 XengShi | ||
* Licensed under the GNU General Public License v3.0 (GPL-3.0) | ||
* You should have received a copy of the GNU General Public License along with this program. | ||
* If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
``` | ||
|
||
3. **Integrate the script into the project** | ||
- Open `index.html` and locate the `<!-- SCRIPTS -->` section. | ||
- Add your script as follows: | ||
```html | ||
<script defer src="scripts/animation-feature.js"></script> | ||
``` | ||
|
||
4. **Develop your feature** | ||
- Implement your functionality within the script. Write clean, maintainable code and follow any existing coding standards used in the project. | ||
|
||
--- | ||
|
||
## Additional Notes | ||
Ensure you've read the [code of conduct](../CODE_OF_CONDUCT.md) and the [contributing](../CONTRIBUTING.md). |
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.