Skip to content

Releases: Tom5521/gotext-tools

v2.6.3: fix(po/parse): join message components without newlines

31 Jul 21:36

Choose a tag to compare

Changelog

  • 072bc2b: fix(po/parse): join message components without newlines
  • bf660af: fix(po): correct multiline string formatting in PoCompiler
  • dfb3cbc: feat(Makefile): add sudo support and improve syntax consistency
  • 0d24ad2: build: Fix benchmark target
  • 6903725: build: Improve Makefile
  • ea46ea6: docs: Update README.md
  • 3076cc1: build: Remove useless script
  • eede5bf: docs: Update docs

v2.6.2

13 Jul 20:12

Choose a tag to compare

Changelog

  • 0cb4430: docs: Update README
  • 0c03935: build: Remove justfile and use make
  • a3ca5b4: docs: Update PUML files
  • 50d6a0b: refactor(po): Round nplurals to integer
  • 5b1ea26: refactor(po): Separate merging logic

v2.6.1

03 Jun 02:47

Choose a tag to compare

Changelog

  • 4433068 chore(justfile): Add clean flag to goreleaser
  • 64fa9ba ci(.github): Remove build
  • de3c865 ci(cli): Add goreleaser
  • dd081db ci: Add latest go test version
  • 0c020e3 ci: Update goreleaser release config
  • 8284cee ci: fix go version
  • 520d2c0 docs(readme): add performance notes and benchmarks comparison between Go versions
  • 7d70e88 feat(cli): add msgounfmt command for converting .mo to .po files
  • 31d3dc1 refactor(po)!: improve validation error handling with breaking changes
  • 974d73b refactor(po): improve parsing and compilation logic
  • 07ed02c refactor: optimize MO file compilation and string handling

v2.6.0

10 May 20:32

Choose a tag to compare

Release v2.6.0

This release focuses on code quality improvements, enhanced documentation, and better handling of PO/MO files. It includes significant refactoring for maintainability and introduces new features for header and charset handling.

New Features

  • Enhanced Header Handling:
    • Refactored header configuration in pkg/go/parse using HeaderConfig and CustomHeader.
    • Improved PO header handling with better template support and validation.
  • Flexible Color Output: Added CLI color options (auto, always, never) for better terminal output control.
  • Improved Charset Support: New internal/util/charset.go for robust charset validation.

🛠 Improvements

  • Code Quality & Organization:
    • Comprehensive docstrings added to all public types, functions, and methods in the PO package.
    • Renamed variables/functions for clarity (e.g., LitterConfigLitterOptions).
    • Standardized error handling and logging messages.
  • MO File Handling:
    • Replaced unsafe pointer-based endianness check with cpu.IsBigEndian from golang.org/x/sys.
    • Restructured MoHeader to use explicit MajorVersion/MinorVersion fields.
  • Testing Utilities:
    • Enhanced diff formatting and equality checks in tests.
    • Removed unused dependencies and added new utility packages (e.g., sanity-io/litter).

📚 Documentation

  • Updated Code Comments: Improved explanations and organization across the codebase.
  • Refreshed Diagrams: Updated PUML files for better visual documentation.

⚠️ Breaking Changes

  • Header handling in pkg/go/parse now uses HeaderConfig and CustomHeader instead of separate options.
  • CLI color flag changed from boolean to string enum (auto/always/never).

Full Changelog: v2.5.0...v2.6.0

v2.5.0

05 May 22:28

Choose a tag to compare

Release v2.5.0

This release brings significant improvements in documentation, build system optimizations, and a new optional CLI wrapper for better tool management.

New Features

  • Optional Unified CLI: Introduced gotext-tools as a convenience wrapper for all tools (msgofmt, msgomerge, xgotext), while maintaining standalone binaries.
  • Auto-generated Documentation:
    • New docs command generates Markdown & man pages for all tools.
    • Added doc-tree for complete documentation hierarchy.
  • Enhanced Build System:
    • Smarter Go file detection (now checks any .go file).
    • New cli-docs recipe for automated CLI docs generation.

🛠 Improvements

  • Memory Efficiency: Replaced map[T]bool with zero-memory map[T]struct{} for tracking.
  • Error Handling: More consistent logging and error propagation.
  • Terminal Output:
    • Standardized formatting across all tools.
    • Improved --verbose flag support.
  • Simplified Build: Removed support for rare architectures/OSes to reduce complexity.

📚 Documentation

  • Updated README: Clarified installation and new wrapper usage.
  • Tool Documentation: All commands now have consistent help output with examples.
  • Internal Docs: Better code comments and package explanations.

⚙️ Installation Options

Choose either:

  1. Standalone Tools (traditional)
git clone https://github.com/Tom5521/gotext-tools
cd gotext-tools
just go-install xgotext
just go-install msgomerge
just go-install msgofmt
# etc...
  1. Optional Wrapper (recommended for CLI)
git clone https://github.com/Tom5521/gotext-tools
cd gotext-tools
just go-install gotext-tools
gotext-tools [tool] [args]... [flags]...

Full Changelog: v2.4.1...v2.5.0


Note: The new wrapper is completely optional - all tools remain available as standalone binaries.

v2.4.1

30 Apr 16:06

Choose a tag to compare

Full Changelog: v2.4.0...v2.4.1

v2.4.0

30 Apr 14:59

Choose a tag to compare

Release v2.4.0

This release introduces several improvements to the CLI tools, syntax highlighting support, and better code organization. Important note: Starting with v2.4.0, the CLI tools have been moved to a Go submodule to avoid unnecessary dependencies in the main library - go install will no longer work directly from the root module.

✨ New Features

  • Added syntax highlighting support for PO files with configurable colors
  • New msgofmt CLI tool for formatting PO files (documentation included)
  • Improved terminal detection for color output in msgomerge
  • CLI tools now use proper command names instead of os.Args[0]

🛠 Improvements

  • Refactored PO parsing utilities into internal package
  • Extracted MO compilation logic into separate file for better organization
  • Improved build system and Justfile recipes
  • Updated dependencies and module structure
  • Removed duplicated tests and added more benchmarks

📚 Documentation

  • Added comprehensive README for new msgofmt tool
  • Updated main README to include msgofmt in tools list
  • Modified installation instructions for all CLI tools

⚠️ Important Changes for CLI Users

The CLI tools are now in a separate Go submodule to keep the main library lightweight. To install CLI tools after v2.4.0:

git clone https://github.com/Tom5521/gotext-tools
just # Or $ just go-install app

This change ensures the main library doesn't pull in unnecessary dependencies for applications that only need the core functionality.

Full Changelog: v2.3.0...v2.4.0

v2.3.0

27 Apr 17:17

Choose a tag to compare

Full Changelog: v2.2.0...v2.3.0

v2.2.0

16 Apr 16:02

Choose a tag to compare

Full Changelog: v2.1.0...v2.2.0

v2.1.0

15 Apr 21:30

Choose a tag to compare

Full Changelog: v2.0.0...v2.1.0