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
  • Wiki
  • Rails I18n

Last edited by Alban Peignier May 06, 2018
Page history

Rails I18n

Enables the following syntax in views, controllers and models:

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 (falls back 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
Clone repository

Architecture

  • Data Models
  • Class Diagram

Install and configure

  • installation manual
  • Optional Feature flags
  • Policy management (TODO)

Best practices in code

Rails code rules

  • Writing a migration
  • Writing a model
  • Writing a controller
  • Writing a view
  • Writing a policy (TODO)
  • Writing a feature (TODO)
  • I18n

Test code rules

  • Writing a spec
  • Writing a javascript test

Exchange format

Neptune

  • Import TODO
  • Export TODO

GTFS

  • Import
  • Export

Netex

  • Import TODO
  • Export TODO