Latvian spell checker for macOS — fork of WARP-LAB/Pareizrakstiba by Reinis Adovičs
  • Shell 60.7%
  • Objective-C++ 21.3%
  • C 11%
  • AppleScript 3.5%
  • Objective-C 3.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ojārs Kapteinis 7293b86c36
All checks were successful
Test build / build (push) Successful in 9s
build-clang.sh: trim VERSION env-default comment
/simplify finding: the 2-line comment was WHAT-narration around the
self-explanatory `${VAR:-default}` bash idiom. Drop to a single
trailing `# dev fallback for local runs` — preserves the WHY (why
have a default at all: local `bash build-clang.sh` shouldn't fail
under set -euo pipefail) without restating the bash mechanics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 12:45:22 +03:00
.forgejo/workflows build: parameterize Info.plist version via $(VERSION) substitution 2026-05-10 11:33:44 +03:00
Dictionaries/lv_LV-1.4.0 add dictionary and affix tables 2020-07-02 13:39:08 +03:00
hunspell move hunspell to submodule v1.7.0 2020-07-03 12:57:52 +03:00
Installer docs: spell Pareizrakstība with ī in prose; clean up README 2026-05-08 07:25:38 +03:00
Licenses add licenses 2020-07-02 13:41:17 +03:00
Pareizrakstiba build: parameterize Info.plist version via $(VERSION) substitution 2026-05-10 11:33:44 +03:00
Pareizrakstiba.xcodeproj review: address /review findings — GPL §2(a), Xcode upgrade marker, deployment target 2026-05-08 06:06:51 +03:00
.gitignore ignore binary applescripts 2020-07-02 19:14:18 +03:00
.gitmodules refactor: 2026 modernization — ARC, modern Hunspell, drop wrapper classes, fix installer security regression 2026-05-08 05:49:47 +03:00
build-clang.sh build-clang.sh: trim VERSION env-default comment 2026-05-10 12:45:22 +03:00
build-debug.sh refactor: 2026 modernization — ARC, modern Hunspell, drop wrapper classes, fix installer security regression 2026-05-08 05:49:47 +03:00
build-pkg.sh docs: pin test-platform (Tahoe 26.4.1 arm64) in README version-history + PKG welcome text 2026-05-08 07:30:56 +03:00
build-release.sh refactor: 2026 modernization — ARC, modern Hunspell, drop wrapper classes, fix installer security regression 2026-05-08 05:49:47 +03:00
LICENSE Initial commit 2020-07-02 13:13:07 +03:00
README.md docs: pin test-platform (Tahoe 26.4.1 arm64) in README version-history + PKG welcome text 2026-05-08 07:30:56 +03:00

Pareizrakstība

Latvian spell-checker for macOS — a system-wide NSSpellServer that adds Latviešu to the spelling-language dropdown of every Cocoa application (TextEdit, Mail, Pages, Notes, Safari plain text fields, etc.).

Fork note: this is a fork of WARP-LAB/Pareizrakstiba by Reinis Adovičs, maintained by Ojārs Kapteinis. The original work and the GPL-2.0 license are preserved unchanged.

What this fork adds (see PR #1 for the full review):

  • Native arm64 binary (upstream is x86_64-only and runs under Rosetta on Apple Silicon).
  • Modernised codebase: ARC enabled, C++17, modern Hunspell std::vector<std::string> API, two redundant wrapper classes deleted; 626 net lines with no functional regression.
  • Three real bug fixes: wordCount NULL-pointer crash, SYSVER_MIN parser broken since macOS 11, broken ps | grep console console-user detection.
  • Installer no longer disables Gatekeeper system-wide. Replaced upstream's spctl --master-disable with a targeted xattr -rd com.apple.quarantine on the installed bundle.
  • Three distribution channels (Homebrew Cask, signed-flow PKG, upstream AppleScript) — see Installation below.
  • CI: every commit builds + validates via Forgejo Actions; tag pushes auto-cut a release.

Requirements

  • macOS 10.15 (Catalina) or newer. The bundle is built with MACOSX_DEPLOYMENT_TARGET = 10.15 in the Xcode project; the manual clang build (used by CI) inherits the host SDK's floor and may produce a higher minOS depending on which SDK ships.
  • Tested on macOS Tahoe 26.4.1 (arm64). Upstream tested on 10.15.5 and 10.13.6.
  • For older macOS versions (10.4 10.12) see the upstream Pareizrakstiba-Archive.

Installation

brew tap ojars/pareizrakstiba https://git.kapteinis.lv/ojars/homebrew-pareizrakstiba
brew install --cask pareizrakstiba

Installs per-user to ~/Library/Services/Pareizrakstiba.service. Removes the macOS download-quarantine attribute, flushes the pasteboard service registry, no admin password required.

To uninstall: brew uninstall --cask pareizrakstiba (add --zap to also delete the ~/Library/Spelling/lv learned-words dictionary).

Download Pareizrakstiba-<VERSION>.pkg from the Releases page and double-click. Installs system-wide to /Library/Services/, requires admin password.

The PKG is unsigned (no Apple Developer Program). On first install you will see one Gatekeeper warning — right-click the PKG and choose Open to bypass it. The installer's postinstall script removes the quarantine attribute on the installed bundle so the spell-service loads cleanly thereafter.

Upstream AppleScript installer (legacy)

The original WARP-LAB installer (Pareizrakstiba_<VERSION>_Installer.zip from WARP-LAB/Pareizrakstiba releases) still works but historically ran spctl --master-disable to bypass Gatekeeper, which permanently allowed unsigned apps from anywhere on the user's machine. This fork's PKG and Cask use targeted xattr -rd com.apple.quarantine instead and do not weaken Gatekeeper.

Usage

Open any Cocoa application (TextEdit, Mail, Pages, Notes, etc.):

Edit → Spelling and Grammar → Show Spelling and Grammar, then in the Language dropdown at the bottom of the panel, select Latviešu (Pareizrakstiba).

Note on the dropdown label: macOS shows Latviešu (Pareizrakstiba) without the ī, because the underlying NSSpellChecker vendor key in the bundle's Info.plist is Pareizrakstiba — kept that way for backward compatibility with the upstream identifier. Throughout this README the program is referred to by its proper Latvian spelling Pareizrakstība, but in the OS dropdown you will see the technical name.

Learned words are stored at ~/Library/Spelling/lv per user.

To set Latvian as the system-wide preferred spelling language so it's selected by default in new documents, run:

defaults write -g NSPreferredSpellServerLanguage 'lv'
defaults write -g NSSpellCheckerAutomaticallyIdentifiesLanguages -bool FALSE

(The PKG installer offers this as a postinstall option; the AppleScript installer asks via dialog.)

Notes

  • Google Docs / Sheets / Slides in Safari, Chrome and others can not be reached by macOS system-wide spellcheck — Google's web apps render text in a way that bypasses the system text engine. Latvian spellcheck inside Google Docs needs Google's own setting.
  • LibreOffice / OpenOffice / iWork users do not need to install per-app Latvian dictionaries — those apps use the macOS system-wide spellcheck, which is what Pareizrakstība provides.
  • Apple's built-in dictionaries: Tahoe ships no native Latvian spell-checker. Pareizrakstība is the only Latvian option in the spelling-language dropdown.
  • Autocompletion: the rarely used autocompletion list is ⌥Esc or F5.
  • Keyboard / language settings: System Settings → Keyboard → Text Input exposes spelling-language defaults.

Building from source

The project ships two build paths:

Manual clang build (no Xcode.app required)

Used by the Forgejo Actions CI on macmini. Requires only Apple's Command Line Tools (xcode-select --install).

git clone --recursive https://git.kapteinis.lv/ojars/latvian-spell-checker.git
cd latvian-spell-checker
bash build-clang.sh

Output: build/manual/Pareizrakstiba.service (ad-hoc codesigned, native arm64).

To produce the installer PKG:

NO_BUILD=1 bash build-pkg.sh

Output: build/Pareizrakstiba-<VERSION>.pkg.

Xcode build (full Xcode.app required)

git clone --recursive https://git.kapteinis.lv/ojars/latvian-spell-checker.git
cd latvian-spell-checker
bash build-release.sh
open build/Release

Output: build/Release/Pareizrakstiba.service.

Open Pareizrakstiba.xcodeproj in Xcode 15/16 if you want to drive the build interactively or accept Xcode's recommended-settings upgrade prompt.

Manually installing a built bundle

killall Pareizrakstiba 2>/dev/null
rm -rf ~/Library/Services/Pareizrakstiba.service
cp -R build/manual/Pareizrakstiba.service ~/Library/Services/
xattr -rd com.apple.quarantine ~/Library/Services/Pareizrakstiba.service
/System/Library/CoreServices/pbs -flush

Open any Cocoa app and check the spelling-language dropdown for Latviešu (Pareizrakstiba).

License

GPL-2.0 (preserved from upstream). See LICENSE.

Hunspell is LGPL/GPL/MPL tri-licensed (see Licenses/Hunspell/). The Latvian dictionary is LGPL-2.1 (see Dictionaries/lv_LV-1.4.0/license.txt).

Version history

2026.01-fork.1

  • 2026-05-08
  • First release of the refactor: 2026 modernization fork.
  • Native arm64 binary (upstream was x86_64-only).
  • ARC enabled; C++17; Hunspell modern std::vector<std::string> API.
  • PareizrakstibaSpellServer (empty NSSpellServer subclass) and PareizrakstibaDelegate (1:1 forwarding wrapper) deleted; the spell checker conforms to NSSpellServerDelegate directly.
  • Three bug fixes: wordCount NULL-pointer crash, SYSVER_MIN parser broken since macOS 11, ps | grep console console-user detection.
  • Installer no longer disables Gatekeeper system-wide (spctl --master-disable → targeted xattr -rd com.apple.quarantine).
  • Three distribution channels: Homebrew Cask, PKG, upstream AppleScript.
  • Forgejo Actions CI on macmini for build + release.
  • Net diff vs upstream 2020.01: 626 lines across 20 files.
  • Tested on: macOS Tahoe 26.4.1 (arm64) — TextEdit end-to-end functional test passed (Latvian morphology recognised via lv_LV.aff affix rules, foreign loanwords correctly flagged, suggestions returned in Latvian, learn/unlearn round-trip works).

2020.01

  • 2020-07-02
  • A version for macOS 10.15 (64-bit) created.
  • Built with minimum deployment target macOS 10.13.
  • Language dictionary and affix tables updated to latest stable 1.4.0 (2020-04-11).
  • Hunspell updated to latest stable 1.7.0 (2018-11-12).
  • Beta as it is not code-signed.

4.0

  • 2018-01-19
  • A version for macOS 10.13 (64-bit) created.
  • Language dictionary and affix tables updated to latest stable 1.3.0 (2016-09-16).
  • Beta as it is not code-signed.

3.2

  • 2015-07-02
  • A version for OS X 10.10+ (64-bit) created. Built with minimum deployment target OS X 10.9.
  • v3.1 still suggested for OS X 10.7 to 10.9.
  • Language dictionary and affix tables updated to 1.1.0 (2015-05-21); Hunspell updated to 1.3.3 (2014-06-02).

3.1

  • 2013-05-03
  • A version for Mac OS X 10.7+ (32 & 64-bit) created.
  • Language dictionary and affix tables updated to 0.9.6 (2013-04-15); Hunspell updated to 1.3.2 (2011-02-16).

3.01

  • 2010-05-16
  • Fix: crash if user checks text containing characters that cannot be losslessly converted to ISO8859-13.

3.0

  • 2010-04-19
  • A version for Mac OS X 10.6 (32 & 64-bit) created. Rewrite for Mac OS X 10.4 and 10.5.
  • Language dictionary and affix tables updated to 0.9.1 (2010-04-22); Hunspell updated to 1.2.9 (2010-03-03).
  • Enabled autocomplete (Esc key).

2.1

  • 2008-05-10
  • Fix: issue with Mac OS X 10.4.

2.0

  • 2008-05-10
  • Fix: issue with iWork '08.
  • Pareizrakstība now registers without vendor name.

1.1

  • 2008-04-01
  • First public version.

1.0

  • 2008-03-31
  • Test version.