WT-856 Get Firefox & Download Firefox Button Text In Wagtail#1250
WT-856 Get Firefox & Download Firefox Button Text In Wagtail#1250dchukhin wants to merge 25 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1250 +/- ##
==========================================
- Coverage 79.52% 79.01% -0.52%
==========================================
Files 147 149 +2
Lines 9403 9764 +361
==========================================
+ Hits 7478 7715 +237
- Misses 1925 2049 +124 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
I think the UI at the 'download button' component level works well. At the data level though, I think this could be a bit more flexible – closer to the existing FTL workflow – if it used the existing 'snippets' pattern, like this:
- Have one snippet type called "Translation Strings" that you'd see on this list: http://localhost:8000/cms-admin/snippets/
- The snippet has a field for a single text string, as well as a field for 'category'. That category field is what you'd filter by in the wagtail frontend. For example in this case
download button. That could be a dropdown, which would require a migration when a new component type needs to use this pattern. But that would reduce the user error when these things are eventually revised.
EDIT: It may be easier to have "download button strings" be its own snippet category, and then every time we need a new one, we have to create it. That's probably ok too.
We already have the snippet pattern of sending strings off to Smartling, which adheres to the Wagtail Translations pattern of "base translation with alternates." So I think when it comes time to create another version of text to be added to the "Download Button collection of strings," the snippet workflow seems more intuitive to me.
make it easier to find the pretranslated text snippets in Wagtail by showing them with other snippets, grouped by their category
make it easier to find the pretranslated text snippets in Wagtail by showing them with other snippets, grouped by their category
One-line summary
This pull request creates the concept of pre-translated text for Download Firefox buttons, so that we can avoid sending the same text to smartling over and over.
Significant changes and points to review
ButtonLabelSnippet, which is visible in the left-hand menu in WagtailButtonLabelSnippetvalues have been populated for each of the locales in Wagtail for "Get Firefox" and "Download Firefox" textDownloadFirefoxButtonBlocks'labelfield has been replaced with a foreign key toButtonLabelSnippet, so Wagtail users can now select a snippet of pre-translated textDownloadFirefoxButtonBlocks still support "Custom Text", so Wagtail users can enter custom button text, that will be sent to smartling for translationIssue / Bugzilla link
WT-856
Testing