Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C chouette-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 36
    • Merge requests 36
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • chouette-core
  • Merge requests
  • !256

Merged
Created Jan 25, 2018 by Administrator@rootMaintainer

Proposed i18n enhancements

  • Overview 0
  • Commits 4
  • Changes 4

Created by: zog

Enables the following syntaxes:

syntax description
"foo.bar".t equivalent to I18n.t("foo.bar")
Catalog.t gets the human name of the Catalog model (plural by default)
Catalog.ts gets the human name of the Catalog model (singular)
Catalog.tmf('name') gets the human name of the Catalog model's name attribute
Catalog.t_action('new) gets the human name of the Catalog model's new action label (fallbacks on generic action labels)

Furthermore, all these methods get the following features:

  • fallback on the default key: if the lookup for foo.bar.baz.bat is unsucessful, we'll look for foo.bar.default.bat, then foo.default.bat, etc.
  • missing keys display + logging: in development mode, missing keys are signaled in the UI and logged in log/missing_keys.log
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: enhanced-i18n