Comments (2)
That's a fair question! Actually, we do have bulk update for the Keys endpoint: https://app.lokalise.com/api2docs/curl/#transition-bulk-update-put It works in the following way https://github.com/lokalise/node-lokalise-api/blob/master/test/keys/keys.spec.ts#L203
For example, we could say:
const keys = await lokaliseApi.keys().bulk_update(
[
{
key_id: 1234,
translations: [
{
language_iso: 'en',
"translation": "English translation"
},
{
language_iso: 'fr',
"translation": "French translation"
},
]
},
{
key_id: 5678,
translations: [
{
language_iso: 'en',
"translation": "English translation for the 2nd key"
},
{
language_iso: 'fr',
"translation": "French translation for the 2nd key"
},
]
},
],
{ project_id: '123.abc'}
);
So, you'll need to know your key IDs to update and then just pass translations
array with the language ISO codes and the corresponding translation values. I believe it should work.
As for the branches, https://lokalise.github.io/node-lokalise-api/api/getting-started#branching here's a brief explanation. All in all, you just provide the branch name right after the project ID separated with :
'123.abc:my_branch'
So, for example to list all keys from a develop
branch:
const keys = await lokaliseApi.keys().list({ project_id: '123.abc:develop' });
You can use exactly the same approach for all other methods: just add branch name after the project ID.
And once again this post https://lokalise.com/blog/lokalise-apiv2-in-practice/ might present some helpful examples as well.
from node-lokalise-api.
I'm going to close this for now but if you have any other questions don't hesitate to reach out to us!
from node-lokalise-api.
Related Issues (20)
- Typescript as a dependency HOT 1
- Pluralise translation shown as a JSON string HOT 6
- UploadFileParams uses old paramter: convert_placeholder HOT 1
- Support corporate proxy HOT 4
- lokaliseApi.queuedProcesses.get HOT 2
- Downloading JSON flat fails with key collision HOT 3
- Module not found: Can't resolve 'dns' HOT 3
- ParamsWithPagination interface is not exported which is used in list() HOT 3
- Unable to use `9.0.0` Error [ERR_REQUIRE_ESM]: require() of ES Module not supported HOT 4
- Using this lib with Deno HOT 11
- \n is escaped (\\n) in translations when downloading translation files HOT 1
- Very loose Typescript definitions HOT 1
- Example lokalise-api-hello-world-app-with-node does not work HOT 3
- Support Remove Key from Task API HOT 1
- OTA API Support HOT 2
- "Project with branches" apis supports HOT 7
- Cannot find module 'got' or its corresponding type declarations. HOT 4
- Missing type definitions for webhook events HOT 8
- KeyDeleted and KeysBulkDeleted are not exported HOT 2
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 node-lokalise-api.