markets / markets/mini_i18n

Introduce `translations_paths`

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
120
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Instead of current method:

```rb
# Path to your translation files.
config.load_translations(__dir__ + '/translations/*')
```

We should introduce a new attribute:

```rb
# Path to your translation files.
config.translations_paths = __dir__ + '/translations/*'
```

Internally, it will call `load_translations` with current `translations_paths` instead of an argument. In order to avoid breaking changes, keep the `load_translations` to accept a path that overrides the `translations_paths`. The setter `translations_paths=`, should call the `load_translations`, so on each change translations will be reloaded.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing load_translations implementation and its current callers. Add the translations_paths attribute so setting it reloads translations, while preserving the existing path argument as an override; verify both usage forms and reload behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
internationalization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.