Open
Conversation
Collaborator
Generated by 🚫 Danger |
1844eef to
91846d0
Compare
91846d0 to
f544109
Compare
Add test strings with minimal/no context and a Kotlin file that uses them. The Dangerfile loads the translation_context_checker plugin from the dangermattic branch to suggest improved context for translations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI uses a minimal Gemfile that doesn't include repo gems. Clone and install txcontext at runtime instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After gem install, clear Gem paths and inject all gem load paths into $LOAD_PATH so require 'txcontext' works under bundle exec.
Install txcontext in unbundled env, then expand GEM_PATH to include system gem dir and scan filesystem for lib paths. Bundler restricts GEM_PATH to the bundle directory, so Gem::Specification.each can't see system-installed gems.
Use ENV.fetch('GEM_PATH', nil) instead of ENV['GEM_PATH'].
a7ae528 to
d56b0b2
Compare
Comment on lines
+4513
to
+4514
| <!-- Screen title --> | ||
| <string name="test_store_settings_title">Settings</string> |
Collaborator
There was a problem hiding this comment.
Suggested change
| <!-- Screen title --> | |
| <string name="test_store_settings_title">Settings</string> | |
| <!-- This is the title displayed on a Store Settings screen, shown as a text label in the screen's title area. --> | |
| <string name="test_store_settings_title">Settings</string> |
Comment on lines
+4510
to
+4511
| <!-- Translation Context Plugin Test Strings --> | ||
| <string name="test_order_action_save">Save</string> |
Collaborator
There was a problem hiding this comment.
Suggested change
| <!-- Translation Context Plugin Test Strings --> | |
| <string name="test_order_action_save">Save</string> | |
| <!-- Label for a save button used in an order-related screen. Tapping this button saves the current action or data in the order flow. --> | |
| <string name="test_order_action_save">Save</string> |
Contributor
There was a problem hiding this comment.
Interesting that it suggests a max length here (presumably in order for the text to fit the design)
Contributor
Author
There was a problem hiding this comment.
Yep, it can return the length if it figures it out somehow based on the context. Though I tweaked the system prompt related to that a little bit, so it adds it only when it has a higher certainty.
|
|
||
| <!-- Translation Context Plugin Test Strings --> | ||
| <string name="test_order_action_save">Save</string> | ||
| <string name="test_order_status_processing">Processing</string> |
Collaborator
There was a problem hiding this comment.
Suggested change
| <string name="test_order_status_processing">Processing</string> | |
| <!-- Displays the 'Processing' status of an order in a status label field. This text indicates that an order is currently being processed. --> | |
| <string name="test_order_status_processing">Processing</string> |
Generated by 🚫 Danger
| <string name="test_order_status_processing">Processing</string> | ||
| <!-- Screen title --> | ||
| <string name="test_store_settings_title">Settings</string> | ||
| <string name="test_product_note_placeholder">Add a note</string> |
Collaborator
There was a problem hiding this comment.
Suggested change
| <string name="test_product_note_placeholder">Add a note</string> | |
| <!-- Placeholder text displayed inside a note input field, prompting the user to enter a note for a product. The text disappears when the user begins typing. --> | |
| <string name="test_product_note_placeholder">Add a note</string> |
Generated by 🚫 Danger
| <!-- Screen title --> | ||
| <string name="test_store_settings_title">Settings</string> | ||
| <string name="test_product_note_placeholder">Add a note</string> | ||
| <string name="test_shipping_label_close">Close</string> |
Collaborator
There was a problem hiding this comment.
Suggested change
| <string name="test_shipping_label_close">Close</string> | |
| <!-- Accessibility label (contentDescription) for a close button in a shipping label screen. This text is read by screen readers to describe the button's action to visually impaired users. --> | |
| <string name="test_shipping_label_close">Close</string> |
Generated by 🚫 Danger
| <string name="test_store_settings_title">Settings</string> | ||
| <string name="test_product_note_placeholder">Add a note</string> | ||
| <string name="test_shipping_label_close">Close</string> | ||
| <string name="test_order_draft_status">Draft</string> |
Collaborator
There was a problem hiding this comment.
Suggested change
| <string name="test_order_draft_status">Draft</string> | |
| <!-- A badge label displayed on an order to indicate its 'Draft' status. This text appears as a status badge on an order screen. --> | |
| <string name="test_order_draft_status">Draft</string> |
Generated by 🚫 Danger
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.
Summary
This is a test PR for the
translation_context_checkerDangermattic plugin implemented in Automattic/dangermattic#112 .What's being tested
strings.xmlwith intentionally short/ambiguous values (Save,Processing,Settings,Add a note,Close,Draft) that should trigger context suggestions from the plugin.TranslationContextTestFragment.kt) that references all the test strings, giving the plugin source-level context to analyze.translation_context_checkerplugin directly from the dangermattic feature branch and runcheck_context_suggestionsagainst the Android project structure.txcontextgem added to Gemfile (sourced fromhttps://github.com/iangmaia/txcontext.git).Expected behavior
When Danger runs on this PR, the
translation_context_checkerplugin should:strings.xmlNote
This PR is for testing purposes only and should not be merged.
🤖 Generated with Claude Code