|
9 | 9 |
|
10 | 10 | from crowdin_api import CrowdinClient # type: ignore |
11 | 11 | from github import Github, Auth |
| 12 | +from dotenv import load_dotenv |
12 | 13 |
|
13 | 14 |
|
| 15 | +load_dotenv() # take environment variables |
| 16 | + |
14 | 17 |
|
15 | 18 | def parse_input() -> dict: |
16 | 19 | gh_input = { |
17 | 20 | # Automations Bot account |
18 | 21 | "username": "scientificpythontranslations", |
19 | 22 | "crowdin_token": os.environ["CROWDIN_TOKEN"], |
20 | 23 | # Provided by gpg action based on organization secrets |
21 | | - "name": os.environ["GPG_NAME"], |
22 | | - "email": os.environ["GPG_EMAIL"], |
| 24 | + # "name": os.environ["GPG_NAME"], |
| 25 | + # "email": os.environ["GPG_EMAIL"], |
23 | 26 | } |
24 | 27 | return gh_input |
25 | 28 |
|
@@ -146,18 +149,18 @@ def main() -> None: |
146 | 149 | """Main function to run the script.""" |
147 | 150 | try: |
148 | 151 | gh_input = parse_input() |
149 | | - crowdin_project = gh_input["crowdin_project"] |
150 | | - client = ScientificCrowdinClient( |
151 | | - token=gh_input["crowdin_token"], organization="Scientific-python" |
152 | | - ) |
153 | | - valid_languages = client.get_valid_languages( |
154 | | - crowdin_project, |
155 | | - int(gh_input["translation_percentage"]), |
156 | | - int(gh_input["approval_percentage"]), |
157 | | - ) |
158 | | - translators = client.get_project_translators( |
159 | | - crowdin_project, |
160 | | - ) |
| 152 | + # crowdin_project = gh_input["crowdin_project"] |
| 153 | + # client = ScientificCrowdinClient( |
| 154 | + # token=gh_input["crowdin_token"], organization="Scientific-python" |
| 155 | + # ) |
| 156 | + # valid_languages = client.get_valid_languages( |
| 157 | + # crowdin_project, |
| 158 | + # int(gh_input["translation_percentage"]), |
| 159 | + # int(gh_input["approval_percentage"]), |
| 160 | + # ) |
| 161 | + # translators = client.get_project_translators( |
| 162 | + # crowdin_project, |
| 163 | + # ) |
161 | 164 | except Exception as e: |
162 | 165 | print(f"Error: {e}") |
163 | 166 | traceback.print_exc() |
|
0 commit comments