dmmikkel / lokalise-key-push Goto Github PK
View Code? Open in Web Editor NEWGitHub Action that pushes new translations keys to Lokalise
GitHub Action that pushes new translations keys to Lokalise
Hello, I've been using your action to automate uploading my English dictionaries to Lokalise but I have been experiencing an unexpected side effect with the plugin, I figured I'd start a conversation around it while I work towards finding a solution.
When the action is triggered, it's adding english values to the foreign dictionaries. This is inflating the dashboard view's translation counts, which our team uses as an indicator for when to place new translation orders.
As an action configured to upload only the english dictionary, when I'm triggered, I add any new keys I find to each language for a given Lokalise Project.
As an action configured to upload only the english dictionary, when I'm triggered, I add any new keys I find to only the english dictionary for a given Lokalise Project.
# Github Actions Documentation: https://help.github.com/en/github/automating-your-workflow-with-github-actions
# Localisation Service: https://lokalise.com
# Yaml File Source: https://github.com/marketplace/actions/lokalise-key-push
name: Push keys to Lokalise
on:
push:
# Only run workflow for pushes to specific branches
branches:
- master
# Only run workflow when matching files are changed
paths:
- "locales/en/common.json"
jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: dmmikkel/[email protected]
with:
# Api token for the Lokalise account
# with read/write access to the project
api-token: ${{ secrets.redacted }}
# ID of the project to sync
# Ref: https://lokalise.com/settings/redacted/
project-id: redacted
# The relative directory where language files will be found
directory: locales/en
# Which format to parse (json or properties)
format: json
# Which platform to push new keys to
platform: web # or android, ios, other
# The filename new keys should be attached to
filename: common.json
Sample Tax Execution Log
Run dmmikkel/[email protected]
Finished
Read language file /home/runner/work/redacted/locales/en/content.json
Found 546 keys in languge file for 'de'
Read language file /home/runner/work/redacted/locales/en/content.json
Found 546 keys in languge file for 'it'
Read language file /home/runner/work/redacted/locales/en/content.json
Found 546 keys in languge file for 'ja'
Read language file /home/runner/work/redacted/locales/en/content.json
Found 546 keys in languge file for 'ko'
Read language file /home/runner/work/redacted/locales/en/content.json
Found 546 keys in languge file for 'pt_BR'
Read language file /home/runner/work/redacted/locales/en/content.json
Found 546 keys in languge file for 'es'
Keys to push:
syncUps::syncUpCreator
zh_CN: <0>{{creator}}</0> <1>created a Sync-Up</1>
en: <0>{{creator}}</0> <1>created a Sync-Up</1>
zh_TW: <0>{{creator}}</0> <1>created a Sync-Up</1>
fr_CA: <0>{{creator}}</0> <1>created a Sync-Up</1>
fr_FR: <0>{{creator}}</0> <1>created a Sync-Up</1>
de: <0>{{creator}}</0> <1>created a Sync-Up</1>
it: <0>{{creator}}</0> <1>created a Sync-Up</1>
ja: <0>{{creator}}</0> <1>created a Sync-Up</1>
ko: <0>{{creator}}</0> <1>created a Sync-Up</1>
pt_BR: <0>{{creator}}</0> <1>created a Sync-Up</1>
es: <0>{{creator}}</0> <1>created a Sync-Up</1>
Pushing 1 new keys to Lokalise
Push done!
Finished
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.