Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor check spelling script#1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Maxcode123 wants to merge2 commits intopython:3.14
base:3.14
Choose a base branch
Loading
fromMaxcode123:refactor-check-spelling-script

Conversation

Maxcode123
Copy link

Τι αλλαγές εισάγει το παρόν PR;

  • Διαμοιράζει την λογική στο scriptcheck_spelling.py σε πολλαπλές συναρτήσεις
  • Προσθέτει τρεις επιλογές που μπορούν δοθούν μέσω γραμμής εντολής
  • Αλλάζει την προκαθορισμένη συμπεριφορά του προγραμμάτος (δεν τυπώνονται τα ευρεθέντα σφάλματα). Η προηγούμενη συμπεριφορά αναπαράγεται με την επιλογή-p ή--print-errors:python scripts/check_spelling.py --print-errors
  • Προσαρμόζει το Makefile targetspellcheck ώστε να χρησιμοποιεί την παραπάνω επιλογή.

Γιατί χρειάζεται αυτό το PR;

Στονοδηγό συνεισφοράς αναφέρεται το εξής:

Εάν κάποια από τις λέξεις δεν είναι αναγνωρισμένη από το script προσθέστε τη στοdictionary και επαναλάβετε.

Υποβαλλόμενος στην διαδικασία της μετάφρασης του αρχείουlibrary/trace.po έφτασα στο βήμα που περιγράφεται παραπάνω και επειδή βαριόμουν να προσθέσω τις λέξεις μία-μία αποφάσισα να ενισχύσω το υπάρχον script ώστε να αναλάβει αυτό τη δουλειά.
Η προσθήκη νέων λέξεων στο dictionary μπορεί να αυτοματοποιηθεί χρήσει του script:

> python scripts/check_spelling.py --write-entries

Σημειώσεις

Οδηγίες χρήσης script:

> python scripts/check_spelling.py --helpusage: python check_spelling.py [options]spell-check translated .po files and add new entries to the dictionary if needed.options:  -h, --help            show this help message and exit  -p, --print-errors    print the detected errors of the spell-check  -w, --write-entries   write the new detected entries in the dictionary file  -f, --po-files [PO_FILES ...]                        list of .po files to spell-check, if not given checks all po files

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@Maxcode123

[8]ページ先頭

©2009-2025 Movatter.jp