[DIT-11792][DIT-11791][DIT-11960] IOS Strings Dict, Android, ICU format additions#130
Merged
bparrish17 merged 14 commits intoDec 17, 2025
Conversation
…d amongst all export formats. Updated IOSStringsDict to use that class
…s to no longer include baseExport method tests. Updated all formats to test for correct output file creation
…enerics to BaseFormatter to allow for parameter-ized response types
joustrich
reviewed
Dec 16, 2025
Comment on lines
+55
to
+56
| const textItemsMap = await this.fetchTextItemsMap(); | ||
| const componentsMap = await this.fetchComponentsMap(); |
There was a problem hiding this comment.
How about fetching in parallel to speed this up?
Suggested change
| const textItemsMap = await this.fetchTextItemsMap(); | |
| const componentsMap = await this.fetchComponentsMap(); | |
| const [textItemsMap, componentsMap] = await Promise.all([ | |
| this.fetchTextItemsMap(), | |
| this.fetchComponentsMap(), | |
| ]); |
joustrich
reviewed
Dec 16, 2025
| }), | ||
| format: this.exportFormat, | ||
| }; | ||
| const textItemsFileContent = await fetchText<TTextItemsResponse>( |
There was a problem hiding this comment.
Can we parallelize this one as well by pushing to a promises array and awaiting them all at once?
joustrich
reviewed
Dec 16, 2025
| }), | ||
| format: this.exportFormat, | ||
| }; | ||
| const componentsFileContent = await fetchComponents<TComponentsResponse>( |
There was a problem hiding this comment.
Same comment as text items -- Can we parallelize this one as well by pushing to a promises array and awaiting them all at once?
joustrich
approved these changes
Dec 16, 2025
joustrich
left a comment
There was a problem hiding this comment.
Couple suggestions to parallelize the data fetching, but otherwise looks good!
bparrish17
added a commit
that referenced
this pull request
Jan 8, 2026
* [DIT-11970] iOS Strings Format Support (#129) * Add scaffolding for ios-strings support, notably IOSStringsFormatter class, and IOSStringsOutput file * Add /v2/variants endpoint. Update IOSStringsFormatter to pull down variants and projects as expected. Moved shared BaseFormatter class methods out of JSON and IOSStringsFormatters * Minor inline doc updates * Add pull command E2E tests for outputted ios-strings files. Added component mapping to iosStringsFormatter * Add unit tests to IOSSTringsFormatter class * Update variant fetching to be shared across textItems and components. Unit tests additions to IOSStringsFormatter class * Update http request tests to handle default error * Minor: test fix * Minor: cleanup and .gitignore of local items * [DIT-11792][DIT-11791][DIT-11960] IOS Strings Dict, Android, ICU format additions (#130) * Add ios-stringsdict support to BaseFormatter * Refactor IOSStringsFileFormatter into BaseExportFormatter to be shared amongst all export formats. Updated IOSStringsDict to use that class * Add android export format * Add BaseExportFormatter class tests. Updated IOSStringsFormatter tests to no longer include baseExport method tests. Updated all formats to test for correct output file creation * Update base generateQueryParams to take in filters as sole param * Add i18n test cases * Add ios-stringsdict and Android XML formatting tests to pull * Add ICU format. Update HTTP Response types to allow for JSON. Added generics to BaseFormatter to allow for parameter-ized response types * Updated ExportComponentsResponse and TextItemsResponse Zod schema * Made BaseExportFormatter abstract class * Minor: clean * Test fix and HTTP wrapper cleanup * Minor: clean * Add promise.all to fetchTextItemsMap and fetchComponentsMap for performance * [DIT-12000] Add iosLocales Configuration Support (#132) * Add iosLocale to config and file generation * Add new fetch request for swift file from API * Add Swift file generation logic to baseexport class * clean for PR * Add test cases to ios methods on baseExport class * Minor: clean * minor: remove unused type * minor: remove test script * update pull params for export endpoints * Update all instances of 'icu' to be 'json_icu' * Address initial PR comments * Add swift file generation to root of pull command. Address some cleanup review comments * Fix pull command tests for iosLocales * Move generateSwiftFile tests to util file * Minor clean * Remove console log and fix test data * Add test case for empty iosLocalese array * Minor name clarification * Fix format default case, missing promise.all, and typing issue * Added ios-specific getLocalesPath method to those classes, along with tests * Fix issue where ___<variant_id> suffixed files were getting written to iosLocale directories * Split up textItems and components HTTP calls for export vs default * Replaced all instances of 'base' with BASE_VARIANT_ID const in lib/src directory. Removed now-unnecessary type params from Formatter classes * Fix text item text status duplicates from merge. Bump version minor * Fix status filter merge issue * Fix to base variant not getting included in variants (id: all). minor cleanup of statuses qp * Add fetchVariants tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Updated all
/v2/{textItems | components}/exportformats (ios, android, icu) to use a sharedBaseExportFormatterabstract class that's the bulk logic for this PR. This was mostly pulled over from the originalios-stringsimplementation and made a bit more format-agnostic for the rest of the use cases.Added format classes and their respective output configs and what not:
IOS
.stringsdictAndroid
.xmlICU
.jsonUpdated base formatter class's
generateQueryParamsfunction to be less awkwardFixed my old weird HTTP wrapper thing
Context
DIT-11971: [CLI] ICU Format
DIT-11972: [CLI] IOS Strings Dict Format
DIT-11960: [CLI] Android Format
Test Plan
Setup:
I like this config.yml file, it puts everything in one directory and lets you check by format. Just replace the projects and variants configured here with a couple of your local projects/variants that you use regularly. Make sure they have some variables and variant usage in both text items and components that you can test.