Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fb8d537

Browse filesBrowse files
committed
bug #43312 [Translation] [Bridge] [Lokalise] do not export empty strings (taranovegor)
This PR was merged into the 5.3 branch. Discussion ---------- [Translation] [Bridge] [Lokalise] do not export empty strings | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | ~ | License | MIT | Doc PR | ~ This change excludes the possibility of receiving strings without translation. At the moment, all keys that have no translation in the Lokalise panel are empty strings after export. Link to documentation describing the added parameter: https://app.lokalise.com/api2docs/curl/#transition-download-files-post example w/o changes: <img width="1556" alt="Screenshot 2021-10-04 at 16 59 04" src="https://user-images.githubusercontent.com/16158349/135877543-6a108f57-0bed-4a44-9902-b535451925f6.png"> `validators.es.xlf` <img width="475" alt="Screenshot 2021-10-04 at 17 15 09" src="https://user-images.githubusercontent.com/16158349/135877509-ec08f4f7-814d-42bc-8764-dcc0b689b6e5.png"> **TODO:** - [ ] Changelog Commits ------- 1b68040 [Translation] [Bridge] [Lokalise] do not export empty strings
2 parents beaa0b4 + 1b68040 commit fb8d537
Copy full SHA for fb8d537

File tree

2 files changed

+2
-0
lines changed
Filter options

2 files changed

+2
-0
lines changed

‎src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ private function exportFiles(array $locales, array $domains): array
148148
'directory_prefix' => '%LANG_ISO%',
149149
'filter_langs' => array_values($locales),
150150
'filter_filenames' => array_map([$this, 'getLokaliseFilenameFromDomain'], $domains),
151+
'export_empty_as' => 'skip',
151152
],
152153
]);
153154

‎src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ public function testReadForOneLocaleAndOneDomain(string $locale, string $domain,
246246
'directory_prefix' => '%LANG_ISO%',
247247
'filter_langs' => [$locale],
248248
'filter_filenames' => [$domain.'.xliff'],
249+
'export_empty_as' => 'skip',
249250
]);
250251

251252
$this->assertSame('POST', $method);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.