| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
`Faker::Job` only had data for en (and hy, pt-BR), so every other locale silently returned English titles, e.g. `it` produced "Lead Banking Developer" and `de` produced "Design Administrator". Add localized `job` data for the German, French and Italian locales. Each provides the keys `Faker::Job` consumes — `field`, `seniority`, `position`, `key_skills` — plus a `title` template reordered to fit the language (adjective-after-noun for fr/it, e.g. "Directeur Régional", "Dirigente Contabilità"). As with the English generator, titles are synthetic combinations. `fr` follows the lib/locales/fr/ subfolder convention (new fr/job.yml); the other locales get a top-level `job:` block. `de-CH`/`fr-CH` carry their own copies since they do not fall back to `de`/`fr`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
In the fr locale job.yml is it's own file. The other touched locales don't follow this pattern, but the docs mention this as preferable. Should I keep as is, or is this the right moment to introduce a directory for the locales I touched? |
Sorry, something went wrong.
| assert_kind_of String, Faker::Job.key_skill | ||
|
|
||
| # Guard against Faker::Job silently falling back to the English data. | ||
| fields = I18n.translate('faker.job.field', locale: :'de-CH') |
There was a problem hiding this comment.
do we really need this?
Sorry, something went wrong.
| assert_kind_of String, Faker::Job.key_skill | ||
|
|
||
| # Guard against Faker::Job silently falling back to the English data. | ||
| fields = I18n.translate('faker.job.field', locale: :de) |
There was a problem hiding this comment.
same comment here
Sorry, something went wrong.
| assert_kind_of String, Faker::Job.key_skill | ||
|
|
||
| # Guard against Faker::Job silently falling back to the English data. | ||
| fields = I18n.translate('faker.job.field', locale: :'fr-CH') |
There was a problem hiding this comment.
and here
Sorry, something went wrong.
| # Guard against Faker::Job silently falling back to the English data. | ||
| fields = I18n.translate('faker.job.field', locale: :it) |
There was a problem hiding this comment.
| # Guard against Faker::Job silently falling back to the English data. | |
| fields = I18n.translate('faker.job.field', locale: :it) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Motivation / Background
Faker::Job only had data for en (and hy, pt-BR), so every other
locale silently returned English job titles:
This Pull Request adds localized job data for the German, French and
Italian locales. Each provides the keys Faker::Job consumes — field,
seniority, position, key_skills — plus a title template reordered
to fit the language (adjective-after-noun for fr/it). As with the English
generator, titles are synthetic combinations.
Additional information
Output after the change:
Notes:
fr/job.yml); the other locales get a top-level job: block.
de / fr.
education_level are not read by any Faker::Job method).
Tests assert Faker::Job.field is a member of the locale's own field list,
guarding against a regression back to the English fallback.
Checklist