docs/locale_analysis.md
This document provides a comprehensive analysis of the current state of internationalization in the Forem project, specifically focusing on Portuguese (pt) and French (fr) translations.
The following Portuguese locale files have been successfully created:
config/locales/pt.yml - Main Portuguese locale fileconfig/locales/devise.pt.yml - Devise authentication translationsconfig/locales/kaminari.pt.yml - Pagination translationsconfig/locales/devise_invitable.pt.yml - Devise invitation translationsconfig/locales/controllers/pt.yml - General controller translationsconfig/locales/controllers/admin/pt.yml - Admin controller translationsconfig/locales/controllers/api/pt.yml - API controller translationsconfig/locales/views/main/pt.yml - Main view translationsconfig/locales/views/articles/pt.yml - Article view translationsconfig/locales/views/settings/pt.yml - Settings view translationsconfig/locales/views/admin/pt.yml - Admin view translationsconfig/locales/views/users/pt.yml - User view translationsconfig/locales/views/comments/pt.yml - Comment view translationsconfig/locales/views/dashboard/pt.yml - Dashboard view translationsconfig/locales/views/tags/pt.yml - Tag view translationsconfig/locales/views/notifications/pt.yml - Notification view translationsconfig/locales/views/editor/pt.yml - Editor view translationsconfig/locales/helpers/pt.yml - Helper translationsconfig/locales/mailers/pt.yml - Mailer translationsconfig/locales/languages/pt.yml - Language translationsconfig/locales/concerns/pt.yml - Concern translationsconfig/locales/decorators/pt.yml - Decorator translationsconfig/locales/utils/pt.yml - Utility translationsconfig/locales/validators/pt.yml - Validator translationsconfig/locales/services/pt.yml - Service translationsconfig/locales/misc/pt.yml - Miscellaneous translationsconfig/locales/liquid_tags/pt.yml - Liquid tag translationsconfig/locales/lib/pt.yml - Library translationsThe following view files need Portuguese translations:
Credits Views:
app/views/credits/_pricing.pt.html.erbapp/views/credits/_purchase_faq.pt.html.erbPages Views:
app/views/pages/_coc_text.pt.html.erbapp/views/pages/_editor_frontmatter_help.pt.html.erbapp/views/pages/_editor_guide_h3.pt.html.erbapp/views/pages/_editor_guide_text.pt.html.erbapp/views/pages/_editor_liquid_help.pt.html.erbapp/views/pages/_editor_markdown_help.pt.html.erbapp/views/pages/_liquid_tag_section_intro.pt.html.erbapp/views/pages/_placeholder.pt.html.erbapp/views/pages/_privacy_text.pt.html.erbapp/views/pages/_supported_nonurl_embeds_list.pt.html.erbapp/views/pages/_supported_url_embeds_list.pt.html.erbapp/views/pages/_terms_text.pt.html.erbapp/views/pages/_v1_editor_guide_preamble.pt.html.erbapp/views/pages/about.pt.html.erbapp/views/pages/about_listings.pt.html.erbapp/views/pages/bounty.pt.html.erbapp/views/pages/code_of_conduct.pt.html.erbapp/views/pages/community_moderation.pt.html.erbapp/views/pages/contact.pt.html.erbapp/views/pages/editor_guide.pt.html.erbapp/views/pages/faq.pt.html.erbapp/views/pages/forbidden.pt.html.erbapp/views/pages/markdown_basics.pt.html.erbapp/views/pages/post_a_job.pt.html.erbapp/views/pages/privacy.pt.html.erbapp/views/pages/publishing_from_rss_guide.pt.html.erbapp/views/pages/report_abuse.pt.html.erbapp/views/pages/show.pt.html.erbapp/views/pages/tag_moderation.pt.html.erbapp/views/pages/terms.pt.html.erbThe following locale files need Portuguese translations:
config/locales/views/actions/pt.ymlconfig/locales/views/auth/pt.ymlconfig/locales/views/credits/pt.ymlconfig/locales/views/feedback/pt.ymlconfig/locales/views/liquids/pt.ymlconfig/locales/views/listings/pt.ymlconfig/locales/views/manager/pt.ymlconfig/locales/views/misc/pt.ymlconfig/locales/views/moderations/pt.ymlconfig/locales/views/organizations/pt.ymlconfig/locales/views/podcasts/pt.ymlconfig/locales/views/reactions/pt.ymlconfig/locales/views/stories/pt.ymlconfig/locales/views/subforems/pt.ymlThe following French translations are missing:
config/locales/devise.fr.ymlHigh Priority: View files (especially pages and credits)
Medium Priority: Locale files in config/locales/views/
Low Priority: French translations
config/locales/devise.fr.yml)Use the locale file lookup script to track progress:
bin/locale_file_lookup --locales=pt,fr
Create Portuguese translations by copying English files and translating content:
# Example for a view file
cp app/views/pages/about.en.html.erb app/views/pages/about.pt.html.erb
# Then edit the Portuguese file to translate the content
Use Brazilian Portuguese dialect as specified in the original requirements
Maintain consistency with existing Portuguese translations in terms of terminology and style
Test translations by running the i18n test:
bundle exec rspec spec/i18n_spec.rb:15
The bin/locale_file_lookup script provides:
bin/locale_file_lookup --locales=pt,frbin/locale_file_lookup --check-allbin/locale_file_lookup --jsonbin/locale_file_lookup --verbose# Check current coverage
bin/locale_file_lookup --locales=pt,fr
# Get detailed analysis in JSON format
bin/locale_file_lookup --locales=pt,fr --json
# Check all locale files for missing equivalents
bin/locale_file_lookup --check-all
# Show help
bin/locale_file_lookup --help
config/locales/views/config/locales/devise.fr.yml)