Comments (7)
Hi @chopkins123
Does it work without --path-mask?
What's your project-id?
from locize-cli.
Without the --path-mask I still get the same output on the first run. However if I run the same command a 2nd time I get the below output:
nothing to update for en/global
nothing to update for en-GB/global
syncing...
FINISHED
Looking in the /locales
folder I can see 2 new folders en
and en-GB
have been created, both with the same empty global.json
file inside.
I'm testing this against the demo project that locize creates, so en
is set as the reference language, but I've created an en-GB
language as well. This is the full command I'm using:
locize sync -k MY_KEY -i MY_PROJECT -l "en-GB" -n "global" -p "C:\Git\ScratchPad\locize-sync-test\locales" -R false
from locize-cli.
Can you send me the project-id?
If you want you can send an e-mail to [email protected]
from locize-cli.
a few inputs:
you defined the namespace "global" that namespace is empty (or not published)
there's also nothing publish for the language "en-GB"
try this: locize sync -k MY_KEY -i MY_PROJECT -p "C:\Git\ScratchPad\locize-sync-test\locales" -R false
(skip lng and namespace param)
or this: locize sync -k MY_KEY -i MY_PROJECT -p "C:\Git\ScratchPad\locize-sync-test\locales" -R false -n "global" -s false
or add some content to the en-GB/global namespace and publish it
I hope this helps
from locize-cli.
Created a new project with id 579cde95-2ad0-4e76-b6ae-0aa1a3df4427
and just the en-GB
language with a single key helloworld
.
Tried running the below commands and in both scenarios a new file is created at \locales\en-GB\global.json
with the single helloworld
key present.
locize sync -k MY_KEY -i MY_PROJECT -p "C:\Git\ScratchPad\locize-sync-test\locales" -R false
locize sync -k MY_KEY -i MY_PROJECT -p "C:\Git\ScratchPad\locize-sync-test\locales" -R false -n "global" -s false
If I run the command locize sync -k MY_KEY -i MY_PROJECT -p "C:\Git\ScratchPad\locize-sync\locales" -R false -n "global" -s false -m "{{namespace}}/{{language}}.translation"
with my local translation file in the folder locales\global\en-GB.translation.json
, the local file gets overwritten with the helloworld
key
from locize-cli.
Found the issue:
Cloned the repo, can see in the parseLocalLanguage
function uses path.sep
. For the path-mask
I'd used {{namespace}}/{{language}}.translation
but as I'm on windows it should have been {{namespace}}\{{language}}.translation
All working now, keys were synced as expected, thanks for taking a look
from locize-cli.
no problem, welcome ;-)
from locize-cli.
Related Issues (20)
- build cli for alpine HOT 7
- Sync returns a different result for "auto-publish" mode and without it HOT 8
- Locize cli doesn't read `.env` file HOT 2
- Locize sync alters my `.json` files HOT 2
- Ambiguous --compare-modification-time flag behavior HOT 7
- version contains strange undeletable namespaces HOT 1
- Mapping between CLI params and config options HOT 1
- Locize sync results in FetchError HOT 5
- TypeError: Cannot read properties of null (reading 'value') HOT 1
- install.ps1 automatic figuring out of download url version has broken HOT 2
- bug(install): binary install not working HOT 15
- Not downloading all translations HOT 2
- The sync command crashes with Error: Callback was already called HOT 1
- The download command fails with an error when using the android format HOT 4
- vulnerabilities on npm install HOT 2
- `locize format` removes comments from `fluent files` HOT 1
- Fluent's `Message References` is not being saved in Locize. HOT 1
- High severity vulnerabilities on npm install HOT 1
- Locize-cli timeouts on sync HOT 4
- Support overwriting HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from locize-cli.