Skip to content

Commit bbc6015

Browse files
committed
mudando a forma como é pego o commit strings
1 parent f5e5051 commit bbc6015

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

.github/scripts/get_translated_strings_between_commits.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,10 @@ def run_git_command(command):
1818
def get_translated_commit_strings(commit_hash):
1919
try:
2020
run_git_command(f"git switch {commit_hash} --detach")
21-
output = os.popen(f"pocount *.po **/*.po").read()
22-
print(output)
23-
# changed_files = run_git_command(f"git diff-tree --no-commit-id --name-only {commit_hash} -r").split("\n")
24-
# changed_files.remove("")
25-
# changed_count = 0
26-
# for file in changed_files:
27-
# file_path = absolute_path / file
28-
# output = os.popen(f"pocount {file_path}").read()
29-
# strings_match = re.search(pattern_translated_strings, output)
30-
# matched_strings = int(strings_match.group(1)) if strings_match else 0
31-
# changed_count += matched_strings
32-
# return changed_count
21+
output = os.popen(f"pocount {absolute_path}/*.po {absolute_path}/**/*.po").read()
22+
all_translated_results = re.findall(pattern_translated_strings, output, re.DOTALL)
23+
translated_commit_strings = int(all_translated_results[-1])
24+
return translated_commit_strings
3325
except Exception as e:
3426
print(f"Error getting translated strings count: {e}")
3527
return 0

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy