forked from friendica/git.friendi.ca
Tobias Diekershoff
abeff96283
After the November upgrade of the server, the Friendica logo was not displayed on the landing page of Gitea. Turn out 1.) The `img` directory in the `custom` directory is now accessed as `assets/img` and not only `img` 2.) While the `home.tepl` file is still located in `/var/lib/gitea` the `img` directory now has to be in `/usr/share/gitea` The problem may be caused in changes in the configuration file which had to be restored from a backup some month old. |
||
---|---|---|
custom | ||
lang | ||
generate_home_tmpl.py | ||
README.md |
Custom files for git.friendi.ca
These files are the cutsom files for git.friendi.ca.
They are overriding the default template files of gitea.
The content of custom
needs to be placed in /var/lib/gitea
and /usr/share/gitea
(at least at git.friendi.ca).
Files there are accessed in the assets
path.
Translation
Translation of the strings can be done at Transifex with the rest of the project resources.
Workflow
- Update the strings at the top of the
generate_home_tmpl.py
file, those that start with astr_
in the name. - Extract them with
pygettext -p ./lang/C/ generate_home_tmpl.py
- Commit the new
messages.pot
file and push it to the repository at git.friendi.ca - Wait for Transifex to pick up the changes and the translation teams to make the new translations
- Download the finished translations to
lang/$lngcode/LC_MESSAGES/messages.pot
- Edit the
messages.pot
file and set the characterset to UTF-8."Content-Type: text/plain; charset=UTF-8\n"
- Convert the
messages.pot
file tomessages.mo
usingmsgfmt messages.pot
- Run
python3 generate_home_tmpl.py
it will recreate thecustom/templates/home.tmpl
file - Upload that file and copy it to the
custom/templates/
directory of the gitea instance.
License
The python script to generate the template file has been released under the terms of the MIT license.