Conversation
Add support for automation justifications to appear in each project's entry_locale instead of always in English. Changes: - Chief: Add with_project_locale method to temporarily set I18n.locale during detective execution - Chief: Wrap propose_changes in locale context to ensure explanations are generated in project's language - Add 'detectives' namespace to en.yml with all explanation strings organized by detective name (github, floss_license, hardened_sites, name_from_url, project_sites_https, repo_files, subdir_files, test_forced) - Update all detectives to use I18n.t() instead of hardcoded strings: - github_basic_detective: 14 explanation strings - floss_license_detective: 3 explanation strings with interpolation - hardened_sites_detective: 3 constants converted to methods - name_from_url_detective: 3 explanation strings - project_sites_https_detective: 4 explanation strings - repo_files_examine_detective: 6 explanation strings with interpolation - subdir_file_contents_detective: 3 explanation strings with interpolation - test_forced_detective: 1 explanation string with interpolation - build_detective: 1 explanation string shared with repo_files Implementation uses Option 1 approach: Chief temporarily sets I18n.locale to project's entry_locale in an ensure block, guaranteeing locale is restored even if exceptions occur. All 803 tests pass. English translations provided; other languages deferred for future translation service integration. Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
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.
No description provided.