From fcd08c003c452e8ae2e07c762d33a4c12f2c0905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Thu, 26 Oct 2023 19:52:32 +0200 Subject: [PATCH] Add spellchecking on CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- .github/workflows/localizable.yml | 9 +++++++++ .gitignore | 1 + .pyspelling.wordlist.txt | 13 +++++++++++++ .pyspelling.yml | 10 ++++++++++ NextcloudTalk/CallKitManager.m | 2 +- NextcloudTalk/en.lproj/Localizable.strings | 4 ++-- ShareExtension/ShareConfirmationViewController.m | 2 +- 7 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 .pyspelling.wordlist.txt create mode 100644 .pyspelling.yml diff --git a/.github/workflows/localizable.yml b/.github/workflows/localizable.yml index 61c3a019b..005601c13 100644 --- a/.github/workflows/localizable.yml +++ b/.github/workflows/localizable.yml @@ -38,9 +38,18 @@ jobs: run: | git diff + - name: Install dependencies + run: | + pip3 install pyspelling + + - name: Spell check + run: | + python3 -m pyspelling + - name: Verify Changed files uses: tj-actions/verify-changed-files@v16 id: verify-changed-files + if: always() with: fail-if-changed: true files: | diff --git a/.gitignore b/.gitignore index b41a28233..8975731ff 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ NextcloudTalk.xcworkspace/xcshareddata ThirdParty/WebRTC.xcframework .DS_Store testResult.xcresult +dictionary.dic diff --git a/.pyspelling.wordlist.txt b/.pyspelling.wordlist.txt new file mode 100644 index 000000000..7723fac1c --- /dev/null +++ b/.pyspelling.wordlist.txt @@ -0,0 +1,13 @@ +AirPlay +Cancelled +HPB +Matterbridge +Nextcloud +Repo +backend +formattedPhoneNumber +https +ld +listable +lu +decrypted diff --git a/.pyspelling.yml b/.pyspelling.yml new file mode 100644 index 000000000..2ba885674 --- /dev/null +++ b/.pyspelling.yml @@ -0,0 +1,10 @@ +matrix: +- name: English localizable file + aspell: + lang: en + d: en_US + dictionary: + wordlists: + - .pyspelling.wordlist.txt + sources: + - NextcloudTalk/en.lproj/Localizable.strings diff --git a/NextcloudTalk/CallKitManager.m b/NextcloudTalk/CallKitManager.m index 030711360..a6fd295a3 100644 --- a/NextcloudTalk/CallKitManager.m +++ b/NextcloudTalk/CallKitManager.m @@ -258,7 +258,7 @@ - (void)reportIncomingCallForNonCallKitDevicesWithPushNotification:(NCPushNotifi - (void)reportIncomingCallForOldAccount { CXCallUpdate *update = [self defaultCallUpdate]; - update.localizedCallerName = NSLocalizedString(@"Old account", @"Will be used as the caller name when a voip notification can't be decrypted"); + update.localizedCallerName = NSLocalizedString(@"Old account", @"Will be used as the caller name when a VoIP notification can't be decrypted"); NSUUID *callUUID = [NSUUID new]; CallKitCall *call = [[CallKitCall alloc] init]; diff --git a/NextcloudTalk/en.lproj/Localizable.strings b/NextcloudTalk/en.lproj/Localizable.strings index 96ca7264c..4e462cad4 100644 --- a/NextcloudTalk/en.lproj/Localizable.strings +++ b/NextcloudTalk/en.lproj/Localizable.strings @@ -1189,7 +1189,7 @@ /* No comment provided by engineer. */ "OK" = "OK"; -/* Will be used as the caller name when a voip notification can't be decrypted */ +/* Will be used as the caller name when a VoIP notification can't be decrypted */ "Old account" = "Old account"; /* No comment provided by engineer. */ @@ -1624,7 +1624,7 @@ /* No comment provided by engineer. */ "To resolve this issue, use the web interface and go to \"Settings -> Security\"." = "To resolve this issue, use the web interface and go to \"Settings -> Security\"."; -/* TRANSLATORS this is for sending something 'to' a user. Eg. 'To: John Doe' */ +/* TRANSLATORS this is for sending something 'to' a user. E.g. 'To: John Doe' */ "To:" = "To:"; /* No comment provided by engineer. */ diff --git a/ShareExtension/ShareConfirmationViewController.m b/ShareExtension/ShareConfirmationViewController.m index 21fe8506b..a9ffc00e9 100644 --- a/ShareExtension/ShareConfirmationViewController.m +++ b/ShareExtension/ShareConfirmationViewController.m @@ -123,7 +123,7 @@ - (void)viewDidLoad NSDictionary *subAttribute = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:15], NSForegroundColorAttributeName:[UIColor tertiaryLabelColor]}; - NSString *localizedToString = NSLocalizedString(@"To:", @"TRANSLATORS this is for sending something 'to' a user. Eg. 'To: John Doe'"); + NSString *localizedToString = NSLocalizedString(@"To:", @"TRANSLATORS this is for sending something 'to' a user. E.g. 'To: John Doe'"); NSMutableAttributedString *toString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ %@", localizedToString, _room.displayName] attributes:attributes]; [toString addAttributes:subAttribute range:NSMakeRange(0, [localizedToString length])]; self.toLabel.attributedText = toString;