Skip to content

Commit

Permalink
Настройки на rinohtype за PDF експорт да ползва bg език
Browse files Browse the repository at this point in the history
  • Loading branch information
wqweto committed Mar 14, 2024
1 parent d51f926 commit 199782d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 60 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ jobs:
run: |
sudo apt-get update -y
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- name: Build
uses: ammaraskar/sphinx-action@master
with:
docs-folder: .
pre-build-command: |
pip install rinohtype
cp _static/__init__.py /usr/local/lib/python3.8/site-packages/rinoh/language
cp _static/bg.py /usr/local/lib/python3.8/site-packages/rinoh/language
build-command: "make html rinoh"

- name: Deploy HTML
Expand Down
34 changes: 34 additions & 0 deletions _static/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.


from .cls import Language

from .en import EN
from .fr import FR
from .it import IT
from .nl import NL
from .de import DE
from .pl import PL
from .cs import CS
from .bg import BG

__all__ = ['Language', 'EN', 'FR', 'IT', 'NL', 'DE', 'PL', 'CS', 'BG']


# generate docstrings for the Language instances

for code, language_ref in Language.languages.items():
language = language_ref()
lines = ['Localized strings for {}'.format(language.name)]
for string_collection in language.strings.values():
lines.append("\n.. rubric:: {}\n"
.format(type(string_collection).__name__))
for string in string_collection._strings:
lines.append(":{}: {}".format(string.name,
string_collection[string.name]))
language.__doc__ = '\n'.join(lines)
58 changes: 0 additions & 58 deletions _static/cls.py

This file was deleted.

2 changes: 1 addition & 1 deletion manual.rtt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parts =
contents
;back_matter
stylesheet = manual.rts
language = en
language = bg

[SectionTitles]
contents = 'Съдържание'
Expand Down

0 comments on commit 199782d

Please sign in to comment.