Skip to content

Commit

Permalink
refacto
Browse files Browse the repository at this point in the history
  • Loading branch information
Mips2648 committed Feb 5, 2025
1 parent 17fec5f commit 7c62ddb
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 109 deletions.
3 changes: 1 addition & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ runs:
debug: ${{ inputs.debug }}
run: |
export PYTHONPATH=$PYTHONPATH:${{ github.action_path }}
echo "PYTHONPATH=$PYTHONPATH"
python -m src.translate_plugin
python -m plugintranslations
- name: "Create Pull Request to plugin..."
uses: peter-evans/create-pull-request@v7
Expand Down
8 changes: 8 additions & 0 deletions plugintranslations/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from .version import VERSION as __version__

__author__ = "Mips"

__all__ = [
"__version__",
"__author__"
]
4 changes: 4 additions & 0 deletions plugintranslations/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .translator import PluginTranslator

if __name__ == "__main__":
PluginTranslator().start()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
from pathlib import Path
import pytest

# from translate_plugin import TranslatePlugin

from src import translate_plugin
from src.consts import (
from plugintranslations.translator import PluginTranslator
from plugintranslations.consts import (
EN_US,
FR_FR,
ES_ES,
Expand Down Expand Up @@ -51,6 +49,6 @@ def info_json(self, current_working_dir: Path):
info_json_file.write_text(json.dumps(info_json_content, ensure_ascii=False, indent='\t'), encoding="UTF-8")

def test_translate_plugin(self, current_working_dir):
self._test_translate = translate_plugin.TranslatePlugin(current_working_dir)
self._test_translate = PluginTranslator(current_working_dir)
assert self._test_translate is not None
assert isinstance(self._test_translate, translate_plugin.TranslatePlugin)
assert isinstance(self._test_translate, PluginTranslator)
File renamed without changes.
183 changes: 86 additions & 97 deletions src/translate_plugin.py → plugintranslations/translator.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions plugintranslations/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION = "2.0.0"
3 changes: 0 additions & 3 deletions src/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion src/version.py

This file was deleted.

0 comments on commit 7c62ddb

Please sign in to comment.