Skip to content

Latest commit

 

History

History
79 lines (65 loc) · 3.99 KB

CONTRIBUTING.md

File metadata and controls

79 lines (65 loc) · 3.99 KB

Contributing

Thank you for investing your time in contributing to our project! Any contribution you make will be reflected on the next release of MeteoalarmCard.

How to report bugs and propose new features

If you spot a problem in the project or want to propose a improvement or new integration to the project. Search if an issue already exists. If a related issue doesn't exist, you can open a new issue.

Setup local environment

If you don't have MeteoalarmCard running locally please follow this setup guide.

  1. Install newest LTS release of Node.js, it has NPM package manager bundled with it.
  2. Fork this repository using Fork button. This will create a new repository on your account named <your username>/MeteoalarmCard
  3. Clone this repo to wherever you want:
    git clone https://github.com/<your username>/MeteoalarmCard.git
  4. Go into the repo folder:
    cd MeteoalarmCard
  5. Install dependencies (Node.js and npm are required):
    npm install
  6. Run development server. It's going to watch source files, recompile on changes and server compiled file on local server.
    npm start
  7. Add http://localhost:5000/meteoalarm-card.js to your Lovelace Resources.
  8. Add custom: Meteoalarm Card to your Dashboard.

After successfully following this guide you should have card in your dashboard that is complied from your local code. Development server is going to recompile any changes that you make and after that you can see them after refreshing your Home Assistant tab.

How to contribute

  1. Fork the project and clone it to your local machine. Follow the setup guide.
  2. Before making any changes pull from the remote repository to update your main branch
       git pull upstream master
  3. Create a branch on which you will be working.
        git checkout -b update-polish-translation
  4. Commit your changes and push it to your fork of the repository.
  5. Make sure your changes are working locally. Run npm run build to check code style.
  6. Create a Pull Request (PR). Make sure to describe the changes that you made and use the Fixes: #number keyword if you were working on a issue.

How to add translations

We are currently looking to implement more languages to MeteoalarmCard. If you are able to add or improve translations in language you speak don't hastate to make a PR.

Notes about current translation keys

  • editor.disable_swiper - If there is not a good translation for swiper you can keep this word untranslated.
  • editor.description - These keys are used to generate helpful description for users selecting entities. Please make sure they sound correctly in all combinations. The formula is start + any middle key + end
  • editor.description.warning_watch_statement_advisory - If there is not a good translation for words (warning, watch, statement, advisory) you can keep these words untranslated.

If you want to improve existing translation:

  1. Follow the setup guide and contributing guide
  2. Modify the language file in the src/localize/languages directory
  3. Remember that key that are not yet translated have null instead of the string. Please replace them with translated messages.
  4. Open a Pull Request.

If you want to create a new translation:

  1. Follow the setup guide and contributing guide
  2. Copy src/localize/languages/en.json file and name it with appropriate language code.
  3. Translate only the keys (second quotation mark).
  4. Import your translation in src/localize/localize.ts file.
  5. Mention your translation in README.md file (list should be sorted alphabetically).
  6. Open a Pull Request.