markdown-gettext 0.1.1__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: markdown-gettext
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Markdown i18n with gettext
5
5
  Home-page: https://github.com/phunh/markdown-gettext
6
6
  License: LGPL-2.1-or-later
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.8
17
17
  Classifier: Programming Language :: Python :: 3.9
18
18
  Classifier: Topic :: Software Development :: Internationalization
19
- Requires-Dist: PyYAML (>=6.0.1,<7.0.0)
19
+ Requires-Dist: PyYAML (>=5.3,<6.0)
20
20
  Requires-Dist: mdit-py-i18n (>=0.1.0,<0.2.0)
21
21
  Requires-Dist: polib (>=1.2.0,<2.0.0)
22
22
  Project-URL: Repository, https://github.com/phunh/markdown-gettext
@@ -20,7 +20,8 @@ class I18NEntry:
20
20
  def to_poentry(self) -> polib.POEntry:
21
21
  return polib.POEntry(msgid=self.msgid,
22
22
  msgstr='',
23
- occurrences=self.occurrences,
23
+ # 0 passed to polib will be lost, use `str` to keep 0
24
+ occurrences=[(o[0], str(o[1])) for o in self.occurrences],
24
25
  comment=self.comment,
25
26
  msgctxt=self.msgctxt if self.msgctxt != '' else None)
26
27
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  [tool.poetry]
5
5
  name = "markdown-gettext"
6
- version = "0.1.1"
6
+ version = "0.1.3"
7
7
  description = "Markdown i18n with gettext"
8
8
  authors = ["Phu Hung Nguyen <phuhnguyen@outlook.com>"]
9
9
  license = "LGPL-2.1-or-later"
@@ -21,7 +21,7 @@ packages = [{include = "markdown_gettext"}]
21
21
  [tool.poetry.dependencies]
22
22
  python = "^3.8"
23
23
  polib = "^1.2.0"
24
- PyYAML = "^6.0.1"
24
+ PyYAML = "^5.3"
25
25
  mdit-py-i18n = "^0.1.0"
26
26
 
27
27
  [tool.poetry.scripts]
@@ -8,7 +8,7 @@ package_data = \
8
8
  {'': ['*']}
9
9
 
10
10
  install_requires = \
11
- ['PyYAML>=6.0.1,<7.0.0', 'mdit-py-i18n>=0.1.0,<0.2.0', 'polib>=1.2.0,<2.0.0']
11
+ ['PyYAML>=5.3,<6.0', 'mdit-py-i18n>=0.1.0,<0.2.0', 'polib>=1.2.0,<2.0.0']
12
12
 
13
13
  entry_points = \
14
14
  {'console_scripts': ['markdown-gettext = markdown_gettext.cli:main',
@@ -16,7 +16,7 @@ entry_points = \
16
16
 
17
17
  setup_kwargs = {
18
18
  'name': 'markdown-gettext',
19
- 'version': '0.1.1',
19
+ 'version': '0.1.3',
20
20
  'description': 'Markdown i18n with gettext',
21
21
  'long_description': "<!--\nSPDX-FileCopyrightText: 2023 Phu Hung Nguyen <phuhnguyen@outlook.com>\nSPDX-License-Identifier: CC-BY-SA-4.0\n-->\n\n# markdown-gettext\n\nA command line program to do i18n and l10n for individual Markdown files.\n\nCommonMark compliant. All core Markdown elements are supported, as well as\nYAML front matter, table, and definition list.\n\n## Install\n\n```bash\npip install markdown-gettext\n```\n\n## Usage\n\nYou can use either `md-gettext` or `markdown-gettext` command\n\n#### Extraction\n```\nmd-gettext extract [-p PACKAGE] [-r REPORT_ADDR] [-t TEAM_ADDR] md pot\n\npositional arguments:\n md path of the Markdown file to extract messages from\n pot path of the POT file to create\n\noptional arguments:\n -p PACKAGE, --package PACKAGE\n the package name in POT metadata\n -r REPORT_ADDR, --report-addr REPORT_ADDR\n the report address in POT metadata\n -t TEAM_ADDR, --team-addr TEAM_ADDR\n the team address in POT metadata\n```\n\n#### Generation\n```\nmd-gettext generate [-l LANG] in-md po out-md\n\npositional arguments:\n in-md path of the source Markdown file\n po path of the PO file containing translations\n out-md path of the Markdown file to create\n\noptional arguments:\n -l LANG, --lang LANG language of translations\n```\n\n## Notes\n\nSome notes about how different elements are handled:\n- Inlines: newlines and consecutive spaces are not kept;\n- Content of each HTML block isn't parsed into finer tokens but processed\nas a whole;\n- Fenced code blocks: only `//` single comments are processed;\n\n## Development environment\n\n- With Conda\n\n```bash\nconda env create -f environment.yml\nconda activate mg\npoetry install\n```\n",
22
22
  'author': 'Phu Hung Nguyen',