Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ detect and push source content to Transifex
```
USAGE
$ txjs-cli push [PATTERN] [--dry-run] [--fake] [-v] [--purge] [--no-wait] [--token <value>] [--secret <value>] [--append-tags <value>] [--with-tags-only <value>] [--without-tags-only <value>]
[--cds-host <value>] [--do-not-keep-translations] [--override-tags] [--override-occurrences] [--parser auto|i18next|txnativejson] [--key-generator source|hash]
[--cds-host <value>] [--do-not-keep-translations] [--override-tags] [--override-occurrences] [--force-source-update] [--parser auto|i18next|txnativejson] [--key-generator source|hash]

ARGUMENTS
PATTERN [default: **/*.{js,jsx,ts,tsx,html,vue,pug,ejs}] file pattern to scan for strings
Expand All @@ -120,6 +120,7 @@ FLAGS
--no-wait disable polling for upload results
--override-occurrences override occurrences when pushing content
--override-tags override tags when pushing content
--force-source-update force the update of the source strings
--parser=<option> [default: auto] file parser to use
<options: auto|i18next|txnativejson>
--purge purge content on Transifex
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/api/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ async function uploadPhrases(payload, params) {
keep_translations: !params.do_not_keep_translations,
override_tags: !!params.override_tags,
override_occurrences: !!params.override_occurrences,
force_source_update: !!params.force_source_update,
},
}, {
headers: {
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/src/commands/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ class PushCommand extends Command {
do_not_keep_translations: flags['do-not-keep-translations'],
override_tags: flags['override-tags'],
override_occurrences: flags['override-occurrences'],
force_source_update: flags['force-source-update'],
dry_run: flags['dry-run'],
});

Expand Down Expand Up @@ -377,6 +378,10 @@ PushCommand.flags = {
description: 'override occurrences when pushing content',
default: false,
}),
'force-source-update': Flags.boolean({
description: 'force the update of the source strings',
default: false,
}),
parser: Flags.string({
description: 'file parser to use',
default: 'auto',
Expand Down
3 changes: 3 additions & 0 deletions packages/native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ params: Object({
// Replace the existing string occurrences with the occurrences of this request
overrideOccurrences: Boolean,

// Force the update of the source strings
forceSourceUpdate: Boolean

// If true, when wait for processing to be complete before
// resolving this promise
noWait: Boolean,
Expand Down
2 changes: 2 additions & 0 deletions packages/native/src/TxNative.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ export default class TxNative {
* @param {Boolean} params.purge
* @param {Boolean} params.overrideTags
* @param {Boolean} params.overrideOccurrences
* @param {Boolean} params.forceSourceUpdate
* @param {Boolean} params.noWait - do not wait for upload results
* @returns {Object} Data
* @returns {String} Data.jobUrl
Expand Down Expand Up @@ -344,6 +345,7 @@ export default class TxNative {
purge: !!params.purge,
override_tags: !!params.overrideTags,
override_occurrences: !!params.overrideOccurrences,
force_source_update: !!params.forceSourceUpdate,
},
}),
});
Expand Down
2 changes: 1 addition & 1 deletion packages/native/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ declare module '@transifex/native' {
};
string: string;
}>,
config?: { noWait: boolean; overrideTags: boolean; overrideOccurrences: boolean; purge: boolean }
config?: { noWait: boolean; overrideTags: boolean; overrideOccurrences: boolean; purge: boolean; forceSourceUpdate: boolean }
): Promise<{
created: number;
deleted: number;
Expand Down
Loading