Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-davies committed Jul 13, 2024
0 parents commit fbef6f8
Show file tree
Hide file tree
Showing 16 changed files with 248 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = false
tab_width = 4
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.json linguist-detectable=true
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Core team members
# These people are members of the Surge's core team
# and are most likely members of the organization.

* @ethan-davies @Naibuu
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Discord Server
url: https://discord.gg/hfGYS94FhW
about: Surge's official Discord server
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/new-translation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: New Translation
description: Create a new translation for the Surge Launcher
labels: [translation]
title: '[Translation] <title>'

body:
- type: input
id: language
attributes:
label: Language
description: The language of the translation
placeholder: English
validations:
required: true

- type: textarea
id: explanation
attributes:
label: Explanation
description: A brief explanation of why you would like this translation
placeholder: This translation is for the English language because...
validations:
required: true

- type: checkboxes
id: implementation
attributes:
label: Implementation
options:
- label: I am willing to implement this translation myself
required: true
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint JSON files

on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node modules
run: npm install
- name: Lint
run: npm run lint
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release Translations
on:
workflow_dispatch:

jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: locales

- uses: ryand56/[email protected]
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: locales/translations
destination-dir: locales

release:
runs-on: ubuntu-latest
needs: upload

steps:
- id: branch-name
uses: tj-actions/branch-names@v8

- id: commit
uses: prompt/actions-commit-hash@v3

- uses: ncipollo/release-action@v1
with:
name: '${{ steps.commit.outputs.short }}/${{ steps.branch-name.outputs.current_branch }}'
tag: ${{ steps.commit.outputs.short }}
token: ${{ secrets.PAT }}
makeLatest: true
generateReleaseNotes: true
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules

package-lock.json
pnpm-lock.yaml
yarn.lock
4 changes: 4 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
singleQuote: true
tabWidth: 4
semi: false
bracketSpacing: true
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"editorconfig.editorconfig"
]
}
45 changes: 45 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [[email protected]](mailto:[email protected]). 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.

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.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct/](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024-present Surge Team and Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Surge Translations

Repository housing the translations for the Surge Launcher.

## Adding a new language

When creating a new translation we *highly* recommend you [opening an issue](https://github.com/SurgeMod/translations/issues/new/choose), this is to prevent communication errors and so others can track progress.

Once you have done that complete the following steps:
- Copy the contents of the [`en.json`](https://github.com/SurgeMod/translations/blob/master/translations/en.json) file located in the "translations" directory
- [Fork](https://github.com/SurgeMod/translations/fork) the repository
- Create a new `.json` file and translate the text to your desired language
- Rename your file to use the correct [language code](https://www.wikiwand.com/en/List_of_ISO_639-1_codes)

## Merging Changes

Upon translating the text, you can get merged by [creating a pull request](https://github.com/SurgeMod/translations/compare). From there, use the text field to accurately describe what was changed/implemented.


## Translating

For our translations we use JSON files, these files consist of key-value pairs:
```json
"key": "value"
```

Only the value should be translated, the key should remain consistent.

### Support

If you need help or have any questions regarding the translation process, feel free to ask in your respective language's GitHub issue or [join our Discord server](https://discord.gg/mMHUUCtvye). We'll be happy to assist you.

Thank you for contributing to Surge Launcher translations! Your efforts help make our project accessible to a wider audience.
8 changes: 8 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import json from 'eslint-plugin-json'

export default [
{
files: ['**/*.json'],
...json.configs['recommended'],
},
]
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "translations",
"version": "1.0.0",
"description": "Open-source translations for Surge's Launcher",
"license": "MIT",
"type": "module",
"scripts": {
"lint": "eslint ."
},
"devDependencies": {
"eslint": "^9.7.0",
"eslint-plugin-json": "^4.0.0"
}
}
3 changes: 3 additions & 0 deletions translations/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"coming": "soon"
}

0 comments on commit fbef6f8

Please sign in to comment.