generated from custom-cards/boilerplate-card
-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for custom colors per condition (#54)
* type and readme * add more to readme * start plumbing colors down to components * render style block, more plumbing * more work on plumbing, some type fixes * fix typing error * make partly cloudy a light blue instead of gray * Validate colors * fix logic error * improved ci for branches * Fix commonjs import, make styles more specific * Improve types, clean up readme, change partlycloudy color * fix indentation * Try out automatic localization * reference correct commit action tag * [Auto] Adding updated localization files Files changed:\nM src/localize/languages/de.json M src/localize/languages/es.json M src/localize/languages/fr.json M src/localize/languages/nb.json M src/localize/languages/pl.json M src/localize/languages/pt.json * Move translation to its own workflow * do not fail job when no translation is needed * 3.0.0-beta.0 * pull version from package.json instead of const.ts
- Loading branch information
1 parent
afc1a66
commit d1f17f3
Showing
20 changed files
with
373 additions
and
145 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,9 +4,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
|
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,27 @@ | ||
name: 'Build non-main' | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
run: | | ||
cd /home/runner/work/lovelace-hourly-weather/lovelace-hourly-weather | ||
npm ci | ||
npm run build | ||
- name: Save artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hourly-weather.js | ||
retention-days: 5 | ||
path: /home/runner/work/lovelace-hourly-weather/lovelace-hourly-weather/dist/hourly-weather.js |
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,40 @@ | ||
name: 'Translate strings' | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
translate: | ||
name: translate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install localization package | ||
run: npm install -g i18n-auto-translation #-msnyder | ||
|
||
- name: Translate files | ||
id: translate | ||
uses: msnyder-msft/[email protected] | ||
with: | ||
provider: 'google-official' | ||
subscriptionKey: '${{ secrets.TRANSLATOR_SUBSCRIPTION_KEY }}' | ||
filePath: './src/localize/languages/en.json' | ||
from: 'en' | ||
to: 'de,es,fr,nb,pl,pt' | ||
debug: false | ||
|
||
- name: Get current branch name | ||
id: branch_name | ||
run: echo ::set-output name=current_branch::${GITHUB_REF#refs/*/} | ||
|
||
- name: Commit changes | ||
uses: devops-infra/[email protected] | ||
continue-on-error: true | ||
with: | ||
github_token: '${{ secrets.GITHUB_TOKEN }}' | ||
commit_prefix: '[Auto] ' | ||
commit_message: 'Adding updated localization files' | ||
force: false | ||
target_branch: ${{steps.vars.branch_name.current_branch}} |
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
Oops, something went wrong.