diff --git a/src/Console/Command/Generated/ExportAllCommand.php b/src/Console/Command/Generated/ExportAllCommand.php
index ab1e4b0..37a426a 100644
--- a/src/Console/Command/Generated/ExportAllCommand.php
+++ b/src/Console/Command/Generated/ExportAllCommand.php
@@ -35,7 +35,9 @@ protected function configure()
->addOption('charset', '', InputOption::VALUE_REQUIRED, 'Specify preferred character encoding. Alternative to `Accept-Charset` header but accepts a single value which must be valid.', null)
->addOption('breaks', '', InputOption::VALUE_REQUIRED, 'Force platform-specific line-endings. Default is Unix (LF) breaks.', null)
->addOption('no-comments', '', InputOption::VALUE_REQUIRED, 'Disable rendering of redundant inline comments including the Loco banner.', null)
- ->addOption('no-folding', '', InputOption::VALUE_REQUIRED, 'Protect dot-separated keys so that `foo.bar` is not folded into object properties.', null)
+ ->addOption('no-expand', '', InputOption::VALUE_REQUIRED, 'Protect dot notation in keys so that `foo.bar` is not expanded to an object.', null)
+ ->addOption('collisions', '', InputOption::VALUE_REQUIRED, 'Override the default strategy for handling conflicting keys. See key collisions.', null)
+ ->addOption('no-folding', '', InputOption::VALUE_REQUIRED, 'DEPRECATED: alias of `no-expand` for backward compatibility.', null)
;
parent::configure();
}
diff --git a/src/Console/Command/Generated/ExportArchiveCommand.php b/src/Console/Command/Generated/ExportArchiveCommand.php
index ad455ea..20a3fbb 100644
--- a/src/Console/Command/Generated/ExportArchiveCommand.php
+++ b/src/Console/Command/Generated/ExportArchiveCommand.php
@@ -23,7 +23,7 @@ protected function configure()
->setName('loco:export:archive')
->setMethod('exportArchive')
->setDescription('Export all locales to a zip archive')
- ->addArgument('ext', InputArgument::OPTIONAL, 'Target file type specified as a file extension', 'json')
+ ->addArgument('ext', InputArgument::OPTIONAL, 'Target file type specified as a file extension. See available options.', 'json')
->addOption('format', '', InputOption::VALUE_REQUIRED, 'More specific format of file type. e.g. symfony
applies to php
, xlf
& yml
', null)
->addOption('filter', '', InputOption::VALUE_REQUIRED, 'Filter assets by comma-separated tag names. Match any tag with `*` and negate tags by prefixing with `!`', null)
->addOption('index', '', InputOption::VALUE_REQUIRED, 'Override default lookup key for the file format: "id", "text" or a custom alias', null)
@@ -37,7 +37,9 @@ protected function configure()
->addOption('charset', '', InputOption::VALUE_REQUIRED, 'Specify preferred character encoding. Alternative to `Accept-Charset` header but accepts a single value which must be valid.', null)
->addOption('breaks', '', InputOption::VALUE_REQUIRED, 'Force platform-specific line-endings. Default is Unix (LF) breaks.', null)
->addOption('no-comments', '', InputOption::VALUE_REQUIRED, 'Disable rendering of redundant inline comments including the Loco banner.', null)
- ->addOption('no-folding', '', InputOption::VALUE_REQUIRED, 'Protect dot-separated keys so that `foo.bar` is not folded into object properties.', null)
+ ->addOption('no-expand', '', InputOption::VALUE_REQUIRED, 'Protect dot notation in keys so that `foo.bar` is not expanded to an object.', null)
+ ->addOption('collisions', '', InputOption::VALUE_REQUIRED, 'Override the default strategy for handling conflicting keys. See key collisions.', null)
+ ->addOption('no-folding', '', InputOption::VALUE_REQUIRED, 'DEPRECATED: alias of `no-expand` for backward compatibility.', null)
;
parent::configure();
}
diff --git a/src/Console/Command/Generated/ExportLocaleCommand.php b/src/Console/Command/Generated/ExportLocaleCommand.php
index 87d7c98..541a344 100644
--- a/src/Console/Command/Generated/ExportLocaleCommand.php
+++ b/src/Console/Command/Generated/ExportLocaleCommand.php
@@ -24,7 +24,7 @@ protected function configure()
->setMethod('exportLocale')
->setDescription('Export a single locale to a language pack')
->addArgument('locale', InputArgument::REQUIRED, 'Locale to export, specified as short code or language tag. e.g. `en` or `en_GB`', null)
- ->addArgument('ext', InputArgument::OPTIONAL, 'Target file type specified as a file extension', 'json')
+ ->addArgument('ext', InputArgument::OPTIONAL, 'Target file type specified as a file extension. See available options.', 'json')
->addOption('format', '', InputOption::VALUE_REQUIRED, 'More specific format of file type. e.g. symfony
applies to php
, xlf
& yml
', null)
->addOption('filter', '', InputOption::VALUE_REQUIRED, 'Filter assets by comma-separated tag names. Match any tag with `*` and negate tags by prefixing with `!`', null)
->addOption('index', '', InputOption::VALUE_REQUIRED, 'Override default lookup key for the file format: "id", "text" or a custom alias', null)
@@ -37,7 +37,9 @@ protected function configure()
->addOption('charset', '', InputOption::VALUE_REQUIRED, 'Specify preferred character encoding. Alternative to `Accept-Charset` header but accepts a single value which must be valid.', null)
->addOption('breaks', '', InputOption::VALUE_REQUIRED, 'Force platform-specific line-endings. Default is Unix (LF) breaks.', null)
->addOption('no-comments', '', InputOption::VALUE_REQUIRED, 'Disable rendering of redundant inline comments including the Loco banner.', null)
- ->addOption('no-folding', '', InputOption::VALUE_REQUIRED, 'Protect dot-separated keys so that `foo.bar` is not folded into object properties.', null)
+ ->addOption('no-expand', '', InputOption::VALUE_REQUIRED, 'Protect dot notation in keys so that `foo.bar` is not expanded to an object.', null)
+ ->addOption('collisions', '', InputOption::VALUE_REQUIRED, 'Override the default strategy for handling conflicting keys. See key collisions.', null)
+ ->addOption('no-folding', '', InputOption::VALUE_REQUIRED, 'DEPRECATED: alias of `no-expand` for backward compatibility.', null)
;
parent::configure();
}
diff --git a/src/Console/Command/Generated/ExportTemplateCommand.php b/src/Console/Command/Generated/ExportTemplateCommand.php
index 3e8642c..c7c2464 100644
--- a/src/Console/Command/Generated/ExportTemplateCommand.php
+++ b/src/Console/Command/Generated/ExportTemplateCommand.php
@@ -23,20 +23,21 @@ protected function configure()
->setName('loco:export:template')
->setMethod('exportTemplate')
->setDescription('Export a template containing only source keys')
- ->addArgument('ext', InputArgument::OPTIONAL, 'Target file type specified as a file extension', 'json')
+ ->addArgument('ext', InputArgument::OPTIONAL, 'Target file type specified as a file extension. See available options.', 'json')
->addOption('format', '', InputOption::VALUE_REQUIRED, 'More specific format of file type. e.g. symfony
applies to php
, xlf
& yml
', null)
->addOption('filter', '', InputOption::VALUE_REQUIRED, 'Filter assets by comma-separated tag names. Match any tag with `*` and negate tags by prefixing with `!`', null)
->addOption('index', '', InputOption::VALUE_REQUIRED, 'Override default lookup key for the file format: "id", "text" or a custom alias', null)
->addOption('source', '', InputOption::VALUE_REQUIRED, 'Specify alternative source locale instead of project default', null)
->addOption('namespace', '', InputOption::VALUE_REQUIRED, 'Override the project name for some language packs that use it as a key prefix', null)
- ->addOption('fallback', '', InputOption::VALUE_REQUIRED, 'Fallback locale for untranslated assets, specified as short code. e.g. `en` or `en_GB`', null)
->addOption('order', '', InputOption::VALUE_REQUIRED, 'Export translations according to asset order', null)
->addOption('status', '', InputOption::VALUE_REQUIRED, 'Export translations with a specific status or flag. Negate values by prefixing with `!`. e.g. "translated", or "!fuzzy".', null)
->addOption('printf', '', InputOption::VALUE_REQUIRED, 'Force alternative "printf" style. See string formatting', null)
->addOption('charset', '', InputOption::VALUE_REQUIRED, 'Specify preferred character encoding. Alternative to `Accept-Charset` header but accepts a single value which must be valid.', null)
->addOption('breaks', '', InputOption::VALUE_REQUIRED, 'Force platform-specific line-endings. Default is Unix (LF) breaks.', null)
->addOption('no-comments', '', InputOption::VALUE_REQUIRED, 'Disable rendering of redundant inline comments including the Loco banner.', null)
- ->addOption('no-folding', '', InputOption::VALUE_REQUIRED, 'Protect dot-separated keys so that `foo.bar` is not folded into object properties.', null)
+ ->addOption('no-expand', '', InputOption::VALUE_REQUIRED, 'Protect dot notation in keys so that `foo.bar` is not expanded to an object.', null)
+ ->addOption('collisions', '', InputOption::VALUE_REQUIRED, 'Override the default strategy for handling conflicting keys. See key collisions.', null)
+ ->addOption('no-folding', '', InputOption::VALUE_REQUIRED, 'DEPRECATED: alias of `no-expand` for backward compatibility.', null)
;
parent::configure();
}
diff --git a/src/Http/ApiClient.php b/src/Http/ApiClient.php
index 4899b2c..01ce15c 100644
--- a/src/Http/ApiClient.php
+++ b/src/Http/ApiClient.php
@@ -51,8 +51,8 @@
*/
class ApiClient extends GuzzleClient
{
- public const SDK_VERSION = '2.0.13';
- public const API_VERSION = '1.0.28';
+ public const SDK_VERSION = '2.0.14';
+ public const API_VERSION = '1.0.29';
/**
* Factory method to create a new Loco API client.
diff --git a/src/Http/Resources/service.json b/src/Http/Resources/service.json
index 2f1950c..7371c17 100644
--- a/src/Http/Resources/service.json
+++ b/src/Http/Resources/service.json
@@ -1,6 +1,6 @@
{
"name": "Loco",
- "apiVersion": "1.0.28",
+ "apiVersion": "1.0.29",
"baseUri": "https://localise.biz/",
"description": "Loco REST API",
"operations": {
@@ -154,11 +154,32 @@
"description": "Disable rendering of redundant inline comments including the Loco banner.",
"location": "query"
},
+ "no-expand": {
+ "name": "no-expand",
+ "type": "boolean",
+ "required": false,
+ "description": "Protect dot notation in keys so that `foo.bar` is not expanded to an object.",
+ "location": "query"
+ },
+ "collisions": {
+ "name": "collisions",
+ "type": "string",
+ "required": false,
+ "description": "Override the default strategy for handling conflicting keys. See key collisions.",
+ "enum": [
+ "overwrite",
+ "ignore",
+ "fail",
+ "auto",
+ "legacy"
+ ],
+ "location": "query"
+ },
"no-folding": {
"name": "no-folding",
"type": "boolean",
"required": false,
- "description": "Protect dot-separated keys so that `foo.bar` is not folded into object properties.",
+ "description": "DEPRECATED: alias of `no-expand` for backward compatibility.",
"location": "query"
},
"key": {
@@ -193,33 +214,7 @@
"name": "ext",
"type": "string",
"required": true,
- "description": "Target file type specified as a file extension",
- "enum": [
- "arb",
- "csv",
- "html",
- "ini",
- "json",
- "mo",
- "php",
- "po",
- "pot",
- "plist",
- "bplist",
- "properties",
- "res",
- "resx",
- "sql",
- "strings",
- "stringsdict",
- "tmx",
- "ts",
- "txt",
- "xlf",
- "xliff",
- "xml",
- "yml"
- ],
+ "description": "Target file type specified as a file extension. See available options.",
"location": "uri",
"default": "json"
},
@@ -330,11 +325,32 @@
"description": "Disable rendering of redundant inline comments including the Loco banner.",
"location": "query"
},
+ "no-expand": {
+ "name": "no-expand",
+ "type": "boolean",
+ "required": false,
+ "description": "Protect dot notation in keys so that `foo.bar` is not expanded to an object.",
+ "location": "query"
+ },
+ "collisions": {
+ "name": "collisions",
+ "type": "string",
+ "required": false,
+ "description": "Override the default strategy for handling conflicting keys. See key collisions.",
+ "enum": [
+ "overwrite",
+ "ignore",
+ "fail",
+ "auto",
+ "legacy"
+ ],
+ "location": "query"
+ },
"no-folding": {
"name": "no-folding",
"type": "boolean",
"required": false,
- "description": "Protect dot-separated keys so that `foo.bar` is not folded into object properties.",
+ "description": "DEPRECATED: alias of `no-expand` for backward compatibility.",
"location": "query"
},
"key": {
@@ -376,33 +392,7 @@
"name": "ext",
"type": "string",
"required": true,
- "description": "Target file type specified as a file extension",
- "enum": [
- "arb",
- "csv",
- "html",
- "ini",
- "json",
- "mo",
- "php",
- "po",
- "pot",
- "plist",
- "bplist",
- "properties",
- "res",
- "resx",
- "sql",
- "strings",
- "stringsdict",
- "tmx",
- "ts",
- "txt",
- "xlf",
- "xliff",
- "xml",
- "yml"
- ],
+ "description": "Target file type specified as a file extension. See available options.",
"location": "uri",
"default": "json"
},
@@ -506,11 +496,32 @@
"description": "Disable rendering of redundant inline comments including the Loco banner.",
"location": "query"
},
+ "no-expand": {
+ "name": "no-expand",
+ "type": "boolean",
+ "required": false,
+ "description": "Protect dot notation in keys so that `foo.bar` is not expanded to an object.",
+ "location": "query"
+ },
+ "collisions": {
+ "name": "collisions",
+ "type": "string",
+ "required": false,
+ "description": "Override the default strategy for handling conflicting keys. See key collisions.",
+ "enum": [
+ "overwrite",
+ "ignore",
+ "fail",
+ "auto",
+ "legacy"
+ ],
+ "location": "query"
+ },
"no-folding": {
"name": "no-folding",
"type": "boolean",
"required": false,
- "description": "Protect dot-separated keys so that `foo.bar` is not folded into object properties.",
+ "description": "DEPRECATED: alias of `no-expand` for backward compatibility.",
"location": "query"
},
"key": {
@@ -545,33 +556,7 @@
"name": "ext",
"type": "string",
"required": true,
- "description": "Target file type specified as a file extension",
- "enum": [
- "arb",
- "csv",
- "html",
- "ini",
- "json",
- "mo",
- "php",
- "po",
- "pot",
- "plist",
- "bplist",
- "properties",
- "res",
- "resx",
- "sql",
- "strings",
- "stringsdict",
- "tmx",
- "ts",
- "txt",
- "xlf",
- "xliff",
- "xml",
- "yml"
- ],
+ "description": "Target file type specified as a file extension. See available options.",
"location": "uri",
"default": "json"
},
@@ -610,13 +595,6 @@
"description": "Override the project name for some language packs that use it as a key prefix",
"location": "query"
},
- "fallback": {
- "name": "fallback",
- "type": "string",
- "required": false,
- "description": "Fallback locale for untranslated assets, specified as short code. e.g. `en` or `en_GB`",
- "location": "query"
- },
"order": {
"name": "order",
"type": "string",
@@ -675,11 +653,32 @@
"description": "Disable rendering of redundant inline comments including the Loco banner.",
"location": "query"
},
+ "no-expand": {
+ "name": "no-expand",
+ "type": "boolean",
+ "required": false,
+ "description": "Protect dot notation in keys so that `foo.bar` is not expanded to an object.",
+ "location": "query"
+ },
+ "collisions": {
+ "name": "collisions",
+ "type": "string",
+ "required": false,
+ "description": "Override the default strategy for handling conflicting keys. See key collisions.",
+ "enum": [
+ "overwrite",
+ "ignore",
+ "fail",
+ "auto",
+ "legacy"
+ ],
+ "location": "query"
+ },
"no-folding": {
"name": "no-folding",
"type": "boolean",
"required": false,
- "description": "Protect dot-separated keys so that `foo.bar` is not folded into object properties.",
+ "description": "DEPRECATED: alias of `no-expand` for backward compatibility.",
"location": "query"
},
"key": {
@@ -2761,6 +2760,13 @@
"name": "printf",
"location": "json"
},
+ "created": {
+ "description": "Time first added in UTC",
+ "type": "string",
+ "format": "date-time",
+ "name": "created",
+ "location": "json"
+ },
"modified": {
"description": "Time last modified in UTC",
"type": "string",
diff --git a/tests/Http/Command/LiveImportCommandTest.php b/tests/Http/Command/LiveImportCommandTest.php
index 3b5ece9..fd9a939 100644
--- a/tests/Http/Command/LiveImportCommandTest.php
+++ b/tests/Http/Command/LiveImportCommandTest.php
@@ -10,7 +10,7 @@
*
* @group live
*/
-class LiveImportCommmandTest extends ApiClientTestCase
+class LiveImportCommandTest extends ApiClientTestCase
{
public function testLiveImportPostsValidYaml()
{
diff --git a/tests/Http/Command/LivePingCommandTest.php b/tests/Http/Command/LivePingCommandTest.php
index 3bf7fb0..ed1ab01 100644
--- a/tests/Http/Command/LivePingCommandTest.php
+++ b/tests/Http/Command/LivePingCommandTest.php
@@ -13,7 +13,7 @@
* @group noauth
* @group readonly
*/
-class LivePingCommmandTest extends ApiClientTestCase
+class LivePingCommandTest extends ApiClientTestCase
{
/**
* Live ping test via overloaded service method