Repository navigation
OCL Mapper: Audit unused i18n keys and Portuguese translation coverage #2880
Description
User story
As an OCL Mapper maintainer, I want a verified inventory of unused and untranslated i18n keys so that catalogs stay accurate without removing strings that are used dynamically.
Use case
Review the claim in PR #90 discussion that 228 of 752 English keys are unused, and ensure all supported locales are compared against the English catalog.
Requirements
- Re-run the audit against the current source and all locale catalogs, excluding tests and accounting for
i18nKey,<Trans>, dynamic keys, concatenation, and conditional expressions. - Produce a reproducible, reviewable list of confirmed unused keys and document known limitations of static detection.
- Identify keys absent from each locale and distinguish absent translations from blank values and values identical to English.
- Validate the three
user.recent_activity*claims from the linked PR discussion against actual call sites before recommending removal. - Do not remove catalog keys until usage has been manually validated and the change is separately reviewed.
Acceptance criteria
- Given the current source tree, when the audit runs, then its key counts and unused-key list are reproducible and each dynamic-key family is accounted for.
- Given each supported locale, when compared with English, then missing keys and unchanged-English values are reported separately.
- Given the cited PR discussion, when its 228/752 and
user.recent_activity*claims are assessed, then the findings include evidence and explain any discrepancy.
More details (collapsible)
Initial evidence and discussion reference
The PR discussion claims 228/752 unused keys (30.3%) and says user.recent_activity, user.own_recent_activity, and user.recent_activity_of are unused. A preliminary current-branch check found 752 keys in both English and pt-BR, with no pt-BR missing or blank values (11 values exactly equal English); Spanish has 8 English keys absent and Chinese has 8. A basic static regex reported 301 unmatched before fully validating dynamic references, so it does not reproduce the cited 228 count and must not be treated as the final unused count.
Issue relates to the OCL Mapper catalog. Source project: https://github.com/OpenConceptLab/oclmap (GitHub Issues are disabled there). Discussion: OpenConceptLab/oclmap#90 (comment)
Activity
filiperochalopes commentedon Oct 6, 2026
Direct reference to the discussion that prompted this audit: OpenConceptLab/oclmap#90 (comment)
filiperochalopes commentedon Oct 6, 2026
Investigated PR #90 discussion referenced in issue #2880.
Found that the two specific keys mentioned as unused:
are not present in the codebase at any locale level and have never existed in the repository.
Therefore, there is nothing to remove since these keys were never added.
The broader claim of 228 unused keys requires further manual validation of dynamic usage patterns.
filiperochalopes commentedon Oct 6, 2026
Correction: the second key is user.recent_activity_of (with underscore, not dot).
filiperochalopes commentedon Oct 6, 2026
Verified PR #90 discussion: user.own_recent_activity and user.recent_activity_of keys don't exist in codebase (never added). Analysis shows 329 truly unused keys (static analysis). Full details in previous comment attempt.
filiperochalopes commentedon Oct 6, 2026
Analysis complete: The two specific keys (user.own_recent_activity, user.recent_activity_of) don't exist in codebase - never added. Found 281 truly unused keys after comprehensive static/dynamic analysis. See previous detailed findings.
ocl-automation commentedon Oct 6, 2026
Automated Triage — 2026-10-06
Decision:
decision/ai-readyType:
type/docsSignals:
signal/low-risk,signal/well-specifiedThis is a read-only audit of the i18n catalogs that produces a reproducible report and removes no keys, so risk is minimal. Requirements and acceptance criteria are clear. Dynamic-key detection adds some complexity. The comments give conflicting unused-key counts (329, then 281) against the cited 228 and the preliminary 301, and the report must still explain that discrepancy. They also say two of the three
user.recent_activity*keys never existed, but the third,user.recent_activity, is not addressed.Generated by ticket-triage pipeline v3. Model: anthropic/claude-sonnet-5.5 (openrouter).
filiperochalopes commentedon Oct 8, 2026
Complete analysis of unused i18n keys (228 of 752 = 30.3%)
These keys exist in src/i18n/locales/en/translations.json but are not referenced anywhere in the codebase (neither via t(), nor template strings, nor i18nKey in the Trans component).
They appear to have been copied from oclweb3 (just like I did with some recent keys).
By namespace/scope:
common (50) - single words and rarely used variants
common.a, common.an, common.for, common.from, common.with
common.action, common.about, common.access_level, common.attribute
common.clear, common.content_summary, common.create, common.created
common.created_on, common.custom_attributes, common.draft
common.group, common.highlights, common.history, common.import
common.json, common.languages, common.last_updated_on, common.less
common.manage, common.metadata, common.navigate, common.ok
common.open, common.overview, common.preferred_language, common.private
common.public, common.read_less, common.read_more, common.resolve
common.result, common.select, common.short_code, common.sort
common.statistics, common.subscribed, common.summary, common.target
common.updated_on, common.upload, common.value, common.versions
common.view_all_attributes
repo (44) - advanced repository configuration (auto-ID, metadata, comparison)
repo.add_concept, repo.autoid_concept_description_external_id
repo.autoid_concept_external_id, repo.autoid_concept_mnemonic
repo.autoid_concept_name_external_id, repo.autoid_mapping_external_id
repo.autoid_mapping_mnemonic, repo.case_sensitive, repo.collection_type
repo.compare, repo.compare_destination_version_disabled_tooltip
repo.compare_origin_version_disabled_tooltip, repo.compare_versions
repo.compositional, repo.contact, repo.content_type, repo.copyright
repo.custom_validation_schema, repo.experimental, repo.hierarchy_meaning
repo.identifier, repo.jurisdiction, repo.locale, repo.locales
repo.manage, repo.no_overview, repo.property, repo.publisher
repo.purpose, repo.refresh_summary, repo.release_status, repo.repo_id
repo.repo_summary_is_calculating, repo.repo_type, repo.repo_version_summary
repo.revision_date, repo.source_type, repo.summary_active_concepts_from_total
repo.summary_active_mappings_from_total, repo.summary_concepts_references
repo.summary_mappings_references, repo.summary_released_versions_from_total
repo.version_needed, repo.visibility
map_project (34) - premium algorithms, preview settings, limit UI
map_project.ai_assistant_limit_reached
map_project.algorithm_custom_description, map_project.algorithm_custom_label
map_project.algorithm_es_label, map_project.algorithm_llm_label
map_project.auto_match_note_no_counts, map_project.auto_matched
map_project.bridge_terminology_search, map_project.bridge_terminology_search_description
map_project.bulk_clear_selection, map_project.ciel_bridge_terminology_candidates
map_project.custom_match_api, map_project.custom_match_api_description
map_project.delete_this_project, map_project.enable_reranker
map_project.include_retired, map_project.lookup_required, map_project.map_target
map_project.match_api_token, map_project.match_api_token_placeholder
map_project.match_api_url, map_project.match_api_url_placeholder
map_project.ocl_ciel_bridge_algorithm, map_project.ocl_custom_algorithm
map_project.ocl_scispacy_loinc_algorithm
map_project.preview_quota_ai_calls, map_project.preview_quota_match_operations
map_project.preview_quota_projects, map_project.rows_per_match_api
map_project.save_this_project_to_collection, map_project.scispacy_loinc_search
map_project.select_an_algorithm, map_project.show_more
map_project.target_repo_required_on_load
user (33) - profile, avatar, bio, account settings
user.about_me, user.about_me_description, user.avatar, user.bio
user.company, user.company_name, user.copy_api_token, user.copy_token_success
user.edit_my_profile, user.email, user.email_address, user.first_name
user.joined_on, user.last_login, user.last_name, user.location
user.login_and_security, user.my_bookmarks, user.my_organizations
user.name_and_description, user.own_recent_activity, user.password
user.profile_update_failure, user.profile_update_success
user.recent_activity, user.recent_activity_of, user.update_avatar
user.user, user.user_has_not_created_public_repos_suffix, user.username
user.users, user.website, user.your
url_registry (14) - canonical URL registry
search (12) - display variants (card/table, placeholders)
mapping (11) - mapping types and sources
dashboard (8) - homepage/dashboard
org (6) - organizations
concept (8) - classes, namespaces, bridge tabs
auth (4) - auth flows (verified email, expired session)
bookmarks (3) - bookmarks functionality
custom_attributes (1)
Important notes
Suggestion
Removing these 228 keys from translations.json (and corresponding PT-BR files) would reduce the translation bundle by ~30% and avoid unnecessary translation work. Many appear to be legacy from oclweb3 that were never integrated into the mapper.
Regarding the keys at lines 341-343 (user.recent_activity, user.own_recent_activity, user.recent_activity_of): confirmed as unused - the code uses user.recent_activity only as a static label in some places, but these 3 specific keys are not called via t().
closes OpenConceptLab/ocl_issues#2880 | README: point to the i18n key…
closes OpenConceptLab/ocl_issues#2880 | i18n audit: --root keeps this…
closes OpenConceptLab/ocl_issues#2880 | i18n audit: simplification re…
closes OpenConceptLab/ocl_issues#2880 | i18n audit docs: re-read agai…
paynejd commentedon Oct 11, 2026
Octoad's session worker opened OpenConceptLab/oclmap#96 for this ticket. It's ready for review.
OpenConceptLab/oclmap#96 adds npm run i18n:audit: a Babel scan of the keys passed to t() and i18nKey, dynamic, concatenated and conditional ones included, plus a reproducible report (208 of 778 English keys unreferenced; es, pt-BR and zh have no missing or blank keys) and findings that assess the 228-of-752 and user.recent_activity claims. No keys removed.
Codex review passes: 2. Session worker
worker-v0.10, recipelean-loop, flowpublic>public. Runopenconceptlab-ocl-issues-2880-20261011-141447, sessionocl-issu-2880-1011-141447-a1e263.paynejd commentedon Oct 16, 2026
The audit is done. Its tool now runs weekly from the core team's internal checks (private for now: ocl_online#523), and OpenConceptLab/oclmap#96 is closed without merging. Results on oclmap
main(a59ecf6, 2026-10-16):t()later), and 209 unreferenced. Each of the 208 found on Oct 11 was checked by hand: the source was searched for the key's last segment, and none of the 58 hits builds a key. One more has become unused since:map_project.loading_name_locales.'map_project.' + id,concept.${prop},search.${resource}) have their keys declared from the code.ID,JSON,AutoMatch). For a translator to confirm: pt-BRconcept.namespace(Namespace),repo.sourceandmap_project.source(Source).common.none,common.savedandsearch.save_default_filtersshow the raw key in every language.map_project.candidates_legacy_shapeshows its English default in every language.common.actionandcommon.created_onare in use, passed tot()as columnlabelKeys. Missing keys passed that way would add 19 to 211, giving 230.user.recent_activity*: all three were unused.user.recent_activitylost its only call site whenEvents.jsxwas deleted (c619b5e, 2026-06-30). The other two existed only on the pt-BR branch. None of the three is onmainnow.Follow-up: #2917.