-
Notifications
You must be signed in to change notification settings - Fork 6
[DIT-11792][DIT-11791][DIT-11960] IOS Strings Dict, Android, ICU format additions #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DIT-11792][DIT-11791][DIT-11960] IOS Strings Dict, Android, ICU format additions #130
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
| const textItemsMap = await this.fetchTextItemsMap(); | ||
| const componentsMap = await this.fetchComponentsMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about fetching in parallel to speed this up?
| const textItemsMap = await this.fetchTextItemsMap(); | |
| const componentsMap = await this.fetchComponentsMap(); | |
| const [textItemsMap, componentsMap] = await Promise.all([ | |
| this.fetchTextItemsMap(), | |
| this.fetchComponentsMap(), | |
| ]); |
| }), | ||
| format: this.exportFormat, | ||
| }; | ||
| const textItemsFileContent = await fetchText<TTextItemsResponse>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we parallelize this one as well by pushing to a promises array and awaiting them all at once?
| }), | ||
| format: this.exportFormat, | ||
| }; | ||
| const componentsFileContent = await fetchComponents<TComponentsResponse>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple suggestions to parallelize the data fetching, but otherwise looks good!
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.