2018-06-06 15:01:56 +02:00
|
|
|
# Custom files for git.friendi.ca
|
|
|
|
|
2025-02-08 10:09:19 +00:00
|
|
|
These are the custom files for git.friendi.ca, which override the default template files of Forgejo.
|
|
|
|
The content of the `custom` directory is mounted inside the Docker container at `/var/lib/gitea/custom`.
|
2018-06-06 15:01:56 +02:00
|
|
|
|
|
|
|
## Translation
|
|
|
|
|
|
|
|
Translation of the strings can be done at [Transifex](https://www.transifex.com/Friendica/friendica/) with the rest of the project resources.
|
2018-06-11 08:38:22 +02:00
|
|
|
|
|
|
|
## Workflow
|
|
|
|
|
2025-02-08 10:09:19 +00:00
|
|
|
1. Update the strings at the top of the `generate_home_tmpl.py` file — those that start with a `str_` in the name.
|
2018-06-11 08:38:22 +02:00
|
|
|
2. Extract them with `pygettext -p ./lang/C/ generate_home_tmpl.py`
|
|
|
|
3. Commit the new `messages.pot` file and push it to the repository at git.friendi.ca
|
|
|
|
4. Wait for Transifex to pick up the changes and the translation teams to make the new translations
|
2025-02-08 10:09:19 +00:00
|
|
|
5. Download the finished translations to `lang/$langcode/LC_MESSAGES/messages.pot`
|
|
|
|
6. Edit the `messages.pot` file and set the character set to UTF-8:
|
2018-06-11 08:38:22 +02:00
|
|
|
`"Content-Type: text/plain; charset=UTF-8\n"`
|
|
|
|
7. Convert the `messages.pot` file to `messages.mo` using `msgfmt messages.pot`
|
2025-02-08 10:09:19 +00:00
|
|
|
8. Run `python3 generate_home_tmpl.py` to recreate the `custom/templates/home.tmpl` file
|
2018-06-11 08:38:22 +02:00
|
|
|
9. Upload that file and copy it to the `custom/templates/` directory of the gitea instance.
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
2025-02-08 10:09:19 +00:00
|
|
|
The Python script to generate the template file has been released under the terms of the MIT license.
|