Skip to content
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

Add action to download metadata from OneSky #563

Draft
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Draft

Conversation

AliSoftware
Copy link
Contributor

@AliSoftware AliSoftware commented Apr 19, 2024

What

This is a WIP on migrating our code related to OneSky (the translation platform used by Tumblr apps) from Tumblr-iOS and Tumblr-Android's Fastfiles into the release-toolkit

This work has been paused as other priorities came in the way of its progress and now other projects are taking precedence, but still I wanted to push the existing code to keep track of the progress and be able to come back to it at a later time.

Status

Right now the code for the download_metadata_from_onesky (which handles store metadata in fastlane/metadata/*/*.txt) should be working, and the only thing left for that action is to add more unit tests to cover more cases. So that action pretty close to be ready to ship.

Note that the initial plan was to also add ios_download_translations_from_onesky (to download app strings in Localizable.strings) and android_download_translations_from_onesky (for app strings in values/strings.xml) actions too. But in practice these could be added separately.

@dangermattic
Copy link
Collaborator

2 Warnings
⚠️ Please add an entry in the CHANGELOG.md file to describe the changes made by this PR
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

Comment on lines +94 to +95
# TODO: Add :android locale codes
# TODO: Add :glotpress locale codes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎗️ Reminder to add values for android and glotpress too. Once we have values for GlotPress, we might also want to expose a def self.mag16 convenience method too


# The set of common locale codes mappings known to us
#
def self.default
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 API idea: also provide a def self.only(options) method which will expect options to be a Hash with a single key which must be one of the LocaleMap.members, and a value being an Array<String>, so that we can call LocalesMap.only(onesky: %w[fr pt-BR en es it]) to get a subset of the known locales.

We can then implement def self.mag16 by just calling that self.only method with the 16 expected locales, and additionally make it easy for client apps to provide just the custom list of locales they support.

end
end

it 'works' do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIP. We need to add a lot more tests.

Including ones around composite keys (keys which contain . in their name, which OneSky exports as a tree of keys and subkeys split around that .)

@AliSoftware AliSoftware changed the title [Add OneSky actions] Add action to download metadata from OneSky Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants