code4romania / code4romania/website-factory

[Translation] Refactor the help folder to allow translating

Open
#703 0 comments 0 reactions 1 assignee Assigned to @overeha View on GitHub
enhancement :rocket: l10n Languages
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.**

The help folder, with instructions for using Website Factory, is currently structured in the following way:
```
help/content////.md
- wf_scope = government/ong, depends on the instance type
- LANG = the actual language of the translations
- category = the category of the help section (e.g., Introduction, Users, etc.)
- topic = the topic being discussed (e.g., data-responsibility, notifications, etc.)
```

Because of this arrangement, creating a component for this in Weblate is almost impossible since each topic would need its component.

The tree of the current structure
### Each individual `.md` file would have to have its component

The translations of files have been left out.

```
.
├── government
│   ├── en
│   │   ├── 01-Introduction
│   │   │   ├── 01-intro.md
│   │   │   ├── 02-what.md
│   │   │   ├── 03-data-responsibility.md
│   │   │   ├── 04-updates.md
│   │   │   ├── 05-notifications.md
│   │   │   └── 06-requests.md
│   │   ├── 02-Users
│   │   │   ├── 01-intro.md
│   │   │   ├── 02-add.md
│   │   │   ├── 03-roles.md
│   │   │   └── 04-edit.md
│   │   ├── 03-Settings
│   │   │   ├── 01-intro.md
│   │   │   ├── 02-general.md
│   │   │   ├── 03-branding.md
│   │   │   ├── 04-integrations.md
│   │   │   ├── 05-notice.md
│   │   │   ├── 06-social.md
│   │   │   ├── 07-donations.md
│   │   │   ├── 08-languages.md
│   │   │   └── 09-menus.md
│   │   └── 04-Content
│   │   ├── 01-intro.md
│   │   ├── 02-architecture.md
│   │   ├── 03-pages.md
│   │   ├── 04-blocks.md
│   │   ├── 05-blog.md
│   │   ├── 06-forms.md
│   │   ├── 07-form-blocks.md
│   │   ├── 08-form-submissions.md
│   │   ├── 09-people.md
│   │   ├── 10-media.md
│   │   ├── 11-transfer.md
│   │   └── 12-test.md
│   └── ro
│   └── ...
└── ong
├── en
│   ├── 01-Introduction
│   │   ├── 01-intro.md
│   │   ├── 02-what.md
│   │   ├── 03-data-responsibility.md
│   │   ├── 04-updates.md
│   │   ├── 05-notifications.md
│   │   └── 06-requests.md
│   ├── 02-Users
│   │   ├── 01-intro.md
│   │   ├── 02-add.md
│   │   ├── 03-roles.md
│   │   └── 04-edit.md
│   ├── 03-Settings
│   │   ├── 01-intro.md
│   │   ├── 02-general.md
│   │   ├── 03-branding.md
│   │   ├── 04-integrations.md
│   │   ├── 05-notice.md
│   │   ├── 06-social.md
│   │   ├── 07-donations.md
│   │   ├── 08-languages.md
│   │   └── 09-menus.md
│   └── 04-Content
│   ├── 01-intro.md
│   ├── 02-architecture.md
│   ├── 03-pages.md
│   ├── 04-blocks.md
│   ├── 05-blog.md
│   ├── 06-forms.md
│   ├── 07-form-blocks.md
│   ├── 08-form-submissions.md
│   ├── 09-people.md
│   ├── 10-media.md
│   ├── 11-transfer.md
│   └── 12-test.md
├── ka
│   └── ...
└── ro
└── ...

28 directories, 153 files
```

**Describe the solution you'd like**

The translations need to be stored differently, allowing the usage of a translation tool.
The best-structured translations section are the `*.JSON` files [from the lang folder](https://github.com/code4romania/website-factory/tree/main/lang).

**Describe alternatives you've considered**

Alternatively, adding each component one by one would be very time-consuming and cause issues whenever the structure changes.
Adding 62 components would overwhelm the translation project and cause issues for the translators and maintainers.

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.