Hello community,
here is the log from the commit of package python-translation-finder for
openSUSE:Factory checked in at 2020-06-17 14:48:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-translation-finder (Old)
and /work/SRC/openSUSE:Factory/.python-translation-finder.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-translation-finder"
Wed Jun 17 14:48:11 2020 rev:10 rq:815234 version:2.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-translation-finder/python-translation-finder.changes
2020-04-15 19:56:16.701653533 +0200
+++
/work/SRC/openSUSE:Factory/.python-translation-finder.new.3606/python-translation-finder.changes
2020-06-17 14:48:25.964591799 +0200
@@ -1,0 +2,6 @@
+Tue Jun 16 12:13:23 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 2.1:
+ * Added discovery support for formats newly supported by Weblate (HTML,
IDML, OpenDocument, InnoSetup and INI).
+
+-------------------------------------------------------------------
Old:
----
2.0.tar.gz
New:
----
2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-translation-finder.spec ++++++
--- /var/tmp/diff_new_pack.ORpSDA/_old 2020-06-17 14:48:27.672597614 +0200
+++ /var/tmp/diff_new_pack.ORpSDA/_new 2020-06-17 14:48:27.672597614 +0200
@@ -21,7 +21,7 @@
%define modname translation-finder
%define skip_python2 1
Name: python-translation-finder
-Version: 2.0
+Version: 2.1
Release: 0
Summary: Translation Files Finder
License: GPL-3.0-or-later
++++++ 2.0.tar.gz -> 2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.bettercodehub.yml
new/translation-finder-2.1/.bettercodehub.yml
--- old/translation-finder-2.0/.bettercodehub.yml 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/.bettercodehub.yml 2020-05-27
14:27:39.000000000 +0200
@@ -1,3 +1,3 @@
component_depth: 2
languages:
-- python
+ - python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.github/FUNDING.yml
new/translation-finder-2.1/.github/FUNDING.yml
--- old/translation-finder-2.0/.github/FUNDING.yml 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/.github/FUNDING.yml 2020-05-27
14:27:39.000000000 +0200
@@ -1,2 +1,4 @@
+# This file is maintained in https://github.com/WeblateOrg/meta/
+github: [nijel]
custom: https://weblate.org/donate/
liberapay: Weblate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.github/labels.yml
new/translation-finder-2.1/.github/labels.yml
--- old/translation-finder-2.0/.github/labels.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/translation-finder-2.1/.github/labels.yml 2020-05-27
14:27:39.000000000 +0200
@@ -0,0 +1,73 @@
+# This file is maintained in https://github.com/WeblateOrg/meta/
+
+# Default GitHub labels
+- color: d73a4a
+ name: bug
+ description: Something isn't working
+- color: cfd3d7
+ name: duplicate
+ description: This issue or pull request already exists
+- color: a2eeef
+ name: enhancement
+ description: New feature or request
+- color: 7057ff
+ name: good first issue
+ description: Good for newcomers
+- color: 008672
+ name: help wanted
+ description: Extra attention is needed
+- color: e4e669
+ name: invalid
+ description: This doesn't seem right
+- color: d876e3
+ name: question
+ description: Further information is requested
+- color: ffffff
+ name: wontfix
+ description: This will not be worked on
+# Bountysource
+- color: 129e5e
+ name: bounty
+ description: There is a bounty on the issue
+# Dependabot
+- color: 0025ff
+ name: dependencies
+ description: Pull requests that update a dependency file
+- color: 2b67c6
+ name: python
+ description: Pull requests that update Python code
+- color: '168700'
+ name: javascript
+ description: Pull requests that update Javascript code
+- color: ee0701
+ name: security
+ description: Pull requests that address a security vulnerability
+# Hacktoberfest
+- color: 129e5e
+ name: hacktoberfest
+ description: This is good for Hacktoberfest
+# Weblate specific
+- color: 87a2f2
+ name: backlog
+ description: This is currently not on the roadmap
+- color: 0075ca
+ name: documentation
+ description: Improvements or additions to documentation
+- color: d4c5f9
+ name: hosted
+ description: Issues affecting Hosted Weblate service
+- color: e3f49c
+ name: naming
+ description: Discussions about naming certain features
+- color: fef2c0
+ name: translate-toolkit
+ description: Issues which need to be fixed in the translate-toolkit
+- color: 02d7e1
+ name: undecided
+ description: These features might not be implemented at all
+- color: e3f49c
+ name: ux
+ description: User experience issues
+- color: b38ddd
+ name: needinfo
+ description: This needs additional information from the reporter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.github/matchers/flake8.json
new/translation-finder-2.1/.github/matchers/flake8.json
--- old/translation-finder-2.0/.github/matchers/flake8.json 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/.github/matchers/flake8.json 2020-05-27
14:27:39.000000000 +0200
@@ -1,17 +1,17 @@
{
- "problemMatcher": [
+ "problemMatcher": [
+ {
+ "owner": "flake8",
+ "pattern": [
{
- "owner": "flake8",
- "pattern": [
- {
- "regexp": "^([^:]*):(\\d+):(\\d+): (\\w+\\d\\d\\d) (.*)$",
- "file": 1,
- "line": 2,
- "column": 3,
- "code": 4,
- "message": 5
- }
- ]
+ "code": 4,
+ "column": 3,
+ "file": 1,
+ "line": 2,
+ "message": 5,
+ "regexp": "^([^:]*):(\\d+):(\\d+): (\\w+\\d\\d\\d) (.*)$"
}
- ]
+ ]
+ }
+ ]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.github/stale.yml
new/translation-finder-2.1/.github/stale.yml
--- old/translation-finder-2.0/.github/stale.yml 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/.github/stale.yml 2020-05-27
14:27:39.000000000 +0200
@@ -1,7 +1,9 @@
+# This file is maintained in https://github.com/WeblateOrg/meta/
+#
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
-daysUntilStale: 60
+daysUntilStale: 30
# Number of days of inactivity before a stale Issue or Pull Request is closed
daysUntilClose: 14
# Issues or Pull Requests with these labels will never be considered stale.
Set to `[]` to disable
@@ -29,8 +31,8 @@
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
issues:
- daysUntilStale: 14
- daysUntilClose: 7
+ daysUntilStale: 10
+ daysUntilClose: 4
exemptLabels:
- bug
- enhancement
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.github/workflows/closing.yml
new/translation-finder-2.1/.github/workflows/closing.yml
--- old/translation-finder-2.0/.github/workflows/closing.yml 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/.github/workflows/closing.yml 2020-05-27
14:27:39.000000000 +0200
@@ -1,3 +1,4 @@
+# This file is maintained in https://github.com/WeblateOrg/meta/
name: Issue closed
on:
@@ -10,18 +11,18 @@
steps:
- name: Add closed question comment
uses: peter-evans/create-or-update-comment@v1
- if: contains(github.event.issue.labels.*.name, 'question') && !
contains(github.event.issue.labels.*.name, 'wontfix')
+ if: (contains(github.event.issue.labels.*.name, 'question') && !
contains(github.event.issue.labels.*.name, 'wontfix')) ||
join(github.event.issue.labels.*.name) == ''
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
The issue you have reported seems to be resolved now.
- * In case you see similar problem, please open separate issue.
+ * In case you see a similar problem, please open a separate issue.
* If you are happy with the outcome, consider supporting Weblate
by [donating](https://weblate.org/donate/).
- name: Add closed issue comment
uses: peter-evans/create-or-update-comment@v1
- if: "! contains(github.event.issue.labels.*.name, 'invalid') && !
contains(github.event.issue.labels.*.name, 'question') && !
contains(github.event.issue.labels.*.name, 'wontfix') && !
contains(github.event.issue.labels.*.name, 'duplicate') && !
contains(github.event.issue.labels.*.name, 'undecided') &&
github.event.issue.labels.*.name != ''"
+ if: "! contains(github.event.issue.labels.*.name, 'invalid') && !
contains(github.event.issue.labels.*.name, 'question') && !
contains(github.event.issue.labels.*.name, 'wontfix') && !
contains(github.event.issue.labels.*.name, 'duplicate') && !
contains(github.event.issue.labels.*.name, 'undecided') &&
join(github.event.issue.labels.*.name) != ''"
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
@@ -29,5 +30,5 @@
Thank you for your report, the issue you have reported has just
been fixed.
* In case you see a problem with the fix, please comment on this
issue.
- * In case you see similar problem, please open separate issue.
+ * In case you see a similar problem, please open a separate issue.
* If you are happy with the outcome, consider supporting Weblate
by [donating](https://weblate.org/donate/).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/translation-finder-2.0/.github/workflows/label-sync.yml
new/translation-finder-2.1/.github/workflows/label-sync.yml
--- old/translation-finder-2.0/.github/workflows/label-sync.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/translation-finder-2.1/.github/workflows/label-sync.yml 2020-05-27
14:27:39.000000000 +0200
@@ -0,0 +1,20 @@
+# This file is maintained in https://github.com/WeblateOrg/meta/
+name: Sync labels in the declarative way
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - .github/labels.yml
+ - .github/workflows/label-sync.yml
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/[email protected]
+ - uses: micnncim/[email protected]
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_REPOSITORY: ${{ github.repository }}
+ with:
+ manifest: .github/labels.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.github/workflows/labels.yml
new/translation-finder-2.1/.github/workflows/labels.yml
--- old/translation-finder-2.0/.github/workflows/labels.yml 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/.github/workflows/labels.yml 2020-05-27
14:27:39.000000000 +0200
@@ -1,3 +1,4 @@
+# This file is maintained in https://github.com/WeblateOrg/meta/
name: Issue labeled
on:
@@ -15,7 +16,7 @@
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
- This issue has been added to backlog. It is not scheduled on our
road map, but it might be eventually implemented. In case you desperately need
this feature, please consider helping or [funding the
development](https://weblate.org/support/).
+ This issue has been added to the backlog. It is not scheduled on
our roadmap, but it eventually might be implemented. In case you desperately
need this feature, please consider helping or [funding the
development](https://weblate.org/support/).
- name: Add undecided comment
uses: peter-evans/create-or-update-comment@v1
if: github.event.label.name == 'undecided'
@@ -23,4 +24,4 @@
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
- This issue has been put aside. Currently, it is unclear whether it
will be ever implemented as it seems to cover too narrow use case or doesn't
seem to fit into Weblate. Please try to clarify the use case or consider
proposing something more generic to make it useful to more users.
+ This issue has been put aside. Currently, it is unclear whether it
will ever be implemented as it seems to cover too narrow of a use case or
doesn't seem to fit into Weblate. Please try to clarify the use case or
consider proposing something more generic to make it useful to more users.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.github/workflows/lint.yml
new/translation-finder-2.1/.github/workflows/lint.yml
--- old/translation-finder-2.0/.github/workflows/lint.yml 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/.github/workflows/lint.yml 2020-05-27
14:27:39.000000000 +0200
@@ -20,30 +20,9 @@
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
- pip install -r requirements-test.txt
+ pip install -r requirements-lint.txt
- name: Run flake8
run: |
echo "::add-matcher::.github/matchers/flake8.json"
pre-commit run flake8 --all
echo "::remove-matcher owner=flake8::"
-
- pre-commit:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- - uses: actions/cache@v1
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-pip-lint-${{ hashFiles('**/requirements*.txt')
}}
- - name: Setup Python
- uses: actions/setup-python@v1
- with:
- python-version: 3.8
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip wheel
- pip install -r requirements-test.txt
- - name: pre-commit
- run: pre-commit run --all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/translation-finder-2.0/.github/workflows/pre-commit.yml
new/translation-finder-2.1/.github/workflows/pre-commit.yml
--- old/translation-finder-2.0/.github/workflows/pre-commit.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/translation-finder-2.1/.github/workflows/pre-commit.yml 2020-05-27
14:27:39.000000000 +0200
@@ -0,0 +1,32 @@
+# This file is maintained in https://github.com/WeblateOrg/meta/
+name: Pre-commit check
+
+on:
+ push:
+ branches-ignore:
+ - "dependabot/**"
+ pull_request:
+
+jobs:
+ pre-commit:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/cache@v1
+ with:
+ path: |
+ ~/.cache/pip
+ ~/.cache/pre-commit
+ key: ${{ runner.os }}-pre-commit-${{
hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}
+ - name: Setup Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.8
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip wheel
+ pip install -r requirements-lint.txt
+ - name: pre-commit
+ run: pre-commit run --all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.github/workflows/test.yml
new/translation-finder-2.1/.github/workflows/test.yml
--- old/translation-finder-2.0/.github/workflows/test.yml 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/.github/workflows/test.yml 2020-05-27
14:27:39.000000000 +0200
@@ -26,36 +26,36 @@
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}
steps:
- - uses: actions/checkout@v2
- - name: Cache pip
- uses: actions/cache@v1
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{
hashFiles('**/requirements*.txt') }}
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v1
- with:
- python-version: ${{ matrix.python-version }}
- - name: Install pip dependencies
- run: |
- python -m pip install --upgrade pip wheel
- pip install -r requirements.txt -r requirements-test.txt
- - name: Test
- run: |
- py.test --cov=translation_finder translation_finder README.rst
- - name: Coverage
- run: |
- coverage xml
- - uses: codecov/codecov-action@v1
- with:
- token: ${{secrets.CODECOV_TOKEN}}
- flags: unittests
- name: Python ${{ matrix.python-version }}, ${{ matrix.os }}
- - name: DeepSource
- if: matrix.os == 'ubuntu-latest'
- continue-on-error: true
- env:
- DEEPSOURCE_DSN: https://[email protected]
- run: |
- curl https://deepsource.io/cli | sh
- ./bin/deepsource report --analyzer test-coverage --key python
--value-file ./coverage.xml
+ - uses: actions/checkout@v2
+ - name: Cache pip
+ uses: actions/cache@v1
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{
hashFiles('**/requirements*.txt') }}
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install pip dependencies
+ run: |
+ python -m pip install --upgrade pip wheel
+ pip install -r requirements.txt -r requirements-test.txt
+ - name: Test
+ run: |
+ py.test --cov=translation_finder translation_finder README.rst
+ - name: Coverage
+ run: |
+ coverage xml
+ - uses: codecov/codecov-action@v1
+ with:
+ token: ${{secrets.CODECOV_TOKEN}}
+ flags: unittests
+ name: Python ${{ matrix.python-version }}, ${{ matrix.os }}
+ - name: DeepSource
+ if: matrix.os == 'ubuntu-latest'
+ continue-on-error: true
+ env:
+ DEEPSOURCE_DSN:
https://[email protected]
+ run: |
+ curl https://deepsource.io/cli | sh
+ ./bin/deepsource report --analyzer test-coverage --key python
--value-file ./coverage.xml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.pre-commit-config.yaml
new/translation-finder-2.1/.pre-commit-config.yaml
--- old/translation-finder-2.0/.pre-commit-config.yaml 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/.pre-commit-config.yaml 2020-05-27
14:27:39.000000000 +0200
@@ -1,51 +1,58 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
-- repo: https://github.com/pre-commit/mirrors-isort
+ - repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- - id: isort
-- repo: https://github.com/ambv/black
+ - id: isort
+ - repo: https://github.com/ambv/black
rev: 19.10b0
hooks:
- - id: black
-- repo: https://github.com/pre-commit/pre-commit-hooks
+ - id: black
+ - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- - id: trailing-whitespace
- - id: end-of-file-fixer
- - id: check-yaml
- - id: check-xml
- - id: check-toml
- - id: requirements-txt-fixer
- - id: check-merge-conflict
- - id: check-json
- - id: fix-encoding-pragma
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - id: check-yaml
+ - id: check-xml
+ - id: check-toml
+ - id: requirements-txt-fixer
+ - id: check-merge-conflict
+ - id: check-json
+ - id: fix-encoding-pragma
args: [--remove]
- - id: sort-simple-yaml
- - id: mixed-line-ending
+ - id: mixed-line-ending
args: [--fix=lf]
-- repo: https://gitlab.com/pycqa/flake8
+ - repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- - id: flake8
+ - id: flake8
additional_dependencies:
- - flake8-breakpoint
- - flake8-black
- - flake8-bugbear
- - flake8-builtins
- - flake8-comprehensions
- - flake8-django
- - flake8-docstrings
- - flake8-eradicate
- - flake8-executable
- - flake8-isort
- - flake8-logging-format
- - flake8-mutable
- - flake8-no-u-prefixed-strings
- - flake8-print
- - flake8-return
- - flake8-self
- - flake8-string-format
- - pep8-naming
+ - flake8-breakpoint
+ - flake8-black
+ - flake8-bugbear
+ - flake8-builtins
+ - flake8-comprehensions
+ - flake8-django
+ - flake8-docstrings
+ - flake8-eradicate
+ - flake8-executable
+ - flake8-isort
+ - flake8-logging-format
+ - flake8-mutable
+ - flake8-no-u-prefixed-strings
+ - flake8-print
+ - flake8-return
+ - flake8-self
+ - flake8-string-format
+ - pep8-naming
+ - repo: https://github.com/adrienverge/yamllint
+ rev: v1.23.0
+ hooks:
+ - id: yamllint
+ - repo: meta
+ hooks:
+ - id: check-hooks-apply
+ - id: check-useless-excludes
exclude:
'^.*\.(properties)|translation_finder/test_data/app/src/res/main/values-it/strings.xml|translation_finder/test_data/app/src/res/main/values/strings.xml|translation_finder/test_data/json/bom-en.json|translation_finder/test_data/yaml/en/corrupt.yml$'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/.yamllint.yml
new/translation-finder-2.1/.yamllint.yml
--- old/translation-finder-2.0/.yamllint.yml 1970-01-01 01:00:00.000000000
+0100
+++ new/translation-finder-2.1/.yamllint.yml 2020-05-27 14:27:39.000000000
+0200
@@ -0,0 +1,7 @@
+extends: default
+
+rules:
+ line-length:
+ max: 500
+ level: error
+ document-start: disable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/CHANGES.rst
new/translation-finder-2.1/CHANGES.rst
--- old/translation-finder-2.0/CHANGES.rst 2020-04-14 13:18:52.000000000
+0200
+++ new/translation-finder-2.1/CHANGES.rst 2020-05-27 14:27:39.000000000
+0200
@@ -1,6 +1,13 @@
Changelog
=========
+2.1
+---
+
+* Released on 27th May 2020.
+* Added discovery support for formats newly supported by Weblate (HTML,
+ IDML, OpenDocument, InnoSetup and INI).
+
2.0
---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/requirements-lint.txt
new/translation-finder-2.1/requirements-lint.txt
--- old/translation-finder-2.0/requirements-lint.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/translation-finder-2.1/requirements-lint.txt 2020-05-27
14:27:39.000000000 +0200
@@ -0,0 +1 @@
+pre-commit==2.4.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/requirements-test.txt
new/translation-finder-2.1/requirements-test.txt
--- old/translation-finder-2.0/requirements-test.txt 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/requirements-test.txt 2020-05-27
14:27:39.000000000 +0200
@@ -1,5 +1,4 @@
-r requirements.txt
-pre-commit
pytest
pytest-cov
twine
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/setup.py
new/translation-finder-2.1/setup.py
--- old/translation-finder-2.0/setup.py 2020-04-14 13:18:52.000000000 +0200
+++ new/translation-finder-2.1/setup.py 2020-05-27 14:27:39.000000000 +0200
@@ -31,8 +31,6 @@
with open("requirements.txt") as handle:
REQUIRES = handle.read().splitlines()
-with open("requirements-test.txt") as handle:
- REQUIRES_TEST = handle.read().splitlines()[1:]
setup(
name="translation-finder",
@@ -71,7 +69,5 @@
"Topic :: Software Development :: Localization",
"Topic :: Utilities",
],
- setup_requires=["pytest-runner"],
- tests_require=REQUIRES_TEST,
entry_points={"console_scripts": ["weblate-discover =
translation_finder.api:cli"]},
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/translation-finder-2.0/translation_finder/__init__.py
new/translation-finder-2.1/translation_finder/__init__.py
--- old/translation-finder-2.0/translation_finder/__init__.py 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/translation_finder/__init__.py 2020-05-27
14:27:39.000000000 +0200
@@ -24,4 +24,4 @@
from .finder import Finder
__all__ = ("Finder", "discover", "DiscoveryResult")
-__version__ = "2.0"
+__version__ = "2.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translation-finder-2.0/translation_finder/api.py
new/translation-finder-2.1/translation_finder/api.py
--- old/translation-finder-2.0/translation_finder/api.py 2020-04-14
13:18:52.000000000 +0200
+++ new/translation-finder-2.1/translation_finder/api.py 2020-05-27
14:27:39.000000000 +0200
@@ -28,9 +28,14 @@
ASSDiscovery,
FluentDiscovery,
GettextDiscovery,
+ HTMLDiscovery,
+ IDMLDiscovery,
+ INIDiscovery,
+ InnoSetupDiscovery,
JavaDiscovery,
JoomlaDiscovery,
JSONDiscovery,
+ ODFDiscovery,
OSXDiscovery,
PHPDiscovery,
QtDiscovery,
@@ -52,9 +57,14 @@
ASSDiscovery,
FluentDiscovery,
GettextDiscovery,
+ HTMLDiscovery,
+ IDMLDiscovery,
+ INIDiscovery,
+ InnoSetupDiscovery,
JavaDiscovery,
JoomlaDiscovery,
JSONDiscovery,
+ ODFDiscovery,
OSXDiscovery,
PHPDiscovery,
QtDiscovery,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/translation-finder-2.0/translation_finder/discovery/base.py
new/translation-finder-2.1/translation_finder/discovery/base.py
--- old/translation-finder-2.0/translation_finder/discovery/base.py
2020-04-14 13:18:52.000000000 +0200
+++ new/translation-finder-2.1/translation_finder/discovery/base.py
2020-05-27 14:27:39.000000000 +0200
@@ -204,7 +204,11 @@
def filter_files(self):
"""Filters possible file matches."""
- return self.finder.filter_files(self.mask)
+ if isinstance(self.mask, str):
+ masks = [self.mask]
+ else:
+ masks = self.mask
+ return chain.from_iterable(self.finder.filter_files(mask) for mask in
masks)
def get_masks(self):
"""Return all file masks found in the directory.
@@ -230,6 +234,12 @@
yield {"filemask": "/".join(mask)}
+class MonoTemplateDiscovery(BaseDiscovery):
+ def fill_in_new_base(self, result):
+ if "new_base" not in result and "template" in result:
+ result["new_base"] = result["template"]
+
+
class EncodingDiscovery(BaseDiscovery):
encoding_map = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/translation-finder-2.0/translation_finder/discovery/files.py
new/translation-finder-2.1/translation_finder/discovery/files.py
--- old/translation-finder-2.0/translation_finder/discovery/files.py
2020-04-14 13:18:52.000000000 +0200
+++ new/translation-finder-2.1/translation_finder/discovery/files.py
2020-05-27 14:27:39.000000000 +0200
@@ -25,7 +25,7 @@
from ruamel.yaml import YAML
from ruamel.yaml.error import YAMLError, YAMLFutureWarning
-from .base import BaseDiscovery, EncodingDiscovery
+from .base import BaseDiscovery, EncodingDiscovery, MonoTemplateDiscovery
class GettextDiscovery(BaseDiscovery):
@@ -72,13 +72,7 @@
"""XLIFF files discovery."""
file_format = "xliff"
- mask = "*.xliff"
-
- def filter_files(self):
- """Filters possible file matches."""
- return chain(
- self.finder.filter_files(self.mask),
self.finder.filter_files("*.xlf")
- )
+ mask = ("*.xliff", "*.xlf")
class JoomlaDiscovery(BaseDiscovery):
@@ -272,13 +266,7 @@
"""YAML files discovery."""
file_format = "yaml"
- mask = "*.yml"
-
- def filter_files(self):
- """Filters possible file matches."""
- return chain(
- self.finder.filter_files(self.mask),
self.finder.filter_files("*.yaml")
- )
+ mask = ("*.yml", "*.yaml")
def adjust_format(self, result):
if "template" not in result:
@@ -304,28 +292,28 @@
result["file_format"] = "ruby-yaml"
-class SRTDiscovery(BaseDiscovery):
+class SRTDiscovery(MonoTemplateDiscovery):
"""SRT subtitle files discovery."""
file_format = "srt"
mask = "*.srt"
-class SUBDiscovery(BaseDiscovery):
+class SUBDiscovery(MonoTemplateDiscovery):
"""SUB subtitle files discovery."""
file_format = "sub"
mask = "*.sub"
-class ASSDiscovery(BaseDiscovery):
+class ASSDiscovery(MonoTemplateDiscovery):
"""ASS subtitle files discovery."""
file_format = "ass"
mask = "*.ass"
-class SSADiscovery(BaseDiscovery):
+class SSADiscovery(MonoTemplateDiscovery):
"""SSA subtitle files discovery."""
file_format = "ssa"
@@ -337,3 +325,38 @@
file_format = "php"
mask = "*.php"
+
+
+class IDMLDiscovery(MonoTemplateDiscovery):
+ """IDML files discovery."""
+
+ file_format = "idml"
+ mask = "*.idml"
+
+
+class HTMLDiscovery(MonoTemplateDiscovery):
+ """HTML files discovery."""
+
+ file_format = "html"
+ mask = ("*.html", "*.htm")
+
+
+class ODFDiscovery(MonoTemplateDiscovery):
+ """ODF files discovery."""
+
+ file_format = "odf"
+ mask = ("*.odt", "*.ods", "*.odp")
+
+
+class INIDiscovery(BaseDiscovery):
+ """INI files discovery."""
+
+ file_format = "ini"
+ mask = "*.ini"
+
+
+class InnoSetupDiscovery(BaseDiscovery):
+ """InnoSetup files discovery."""
+
+ file_format = "islu"
+ mask = "*.islu"