From b038afb9d728fe1827d6bcaa2217af72d92753e2 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 | 11 +++++++++++ .gitignore | 1 + .pyspelling.wordlist.txt | 13 +++++++++++++ .pyspelling.yml | 10 ++++++++++ NextcloudTalk/CallKitManager.m | 2 +- NextcloudTalk/en.lproj/Localizable.strings | 6 +++--- ShareExtension/ShareConfirmationViewController.m | 2 +- 7 files changed, 40 insertions(+), 5 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 2105d5a81..537c0c00f 100644 --- a/.github/workflows/localizable.yml +++ b/.github/workflows/localizable.yml @@ -34,9 +34,20 @@ jobs: run: | source ./generate-localizable-strings-file.sh + - name: Install dependencies + run: | + pip3 install --upgrade pip setuptools + pip3 install pyspelling + brew install aspell + + - 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 64d85a1df..4e462cad4 100644 --- a/NextcloudTalk/en.lproj/Localizable.strings +++ b/NextcloudTalk/en.lproj/Localizable.strings @@ -1,4 +1,4 @@ -/* No comment provided by engineer. */ +/* No comment provided by engineer. */ "%@ added to this new group conversation" = "%@ added to this new group conversation"; /* No comment provided by engineer. */ @@ -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;