code4romania / code4romania/website-factory

[Database] Refactor the database seeder to better allow translating

Open
#616 0 comments 0 reactions 1 assignee Claimed by @overeha View on GitHub
back-end content enhancement :rocket: l10n Languages php
Dominant language
PHP
Stars
26
Forks
18
Avg merge
1m
Merged PRs (30d)
14

Description

**Is your feature request related to a problem? Please describe.**
Currently, [the seeder JSON files](https://github.com/code4romania/website-factory/tree/main/database/seeders/data/ong) are one JSON file with a different language key for each property.

**Describe the solution you'd like**
One of the structures below seems like a good choice. The first one is similar to the one in the [lang folder](https://github.com/code4romania/website-factory/tree/main/lang):
```
data/ong
├── ro
│ ├── pages.json
│ └── settings.json
├── en
│ ├── pages.json
│ └── settings.json
├── uk
│ ├── pages.json
│ └── settings.json
└── ru
├── pages.json
└── settings.json
```

```
data/ong
├── pages
│ ├── ro.json
│ ├── en.json
│ ├── uk.json
│ └── ru.json
└── settings
├── ro.json
├── en.json
├── uk.json
└── ru.json
```

**Describe alternatives you've considered**
Alternatively, if we can configure [Weblate](https://weblate.org/en/) to accept this file format, I think we can skip this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.