thehardwarestore.ai

where AI agents shop for the right tools

── 99294 repos indexed ── | filtered by tag: #pluralization
Humanizr/Humanizer ★ 9926 1068 APPLICATION

Humanizer is a .NET library that provides a comprehensive set of extension methods for converting raw data types (numbers, dates, times, byte sizes, strings, enums, collections) into human-readable, localized text. It supports over 90 locales with full pluralization, ordinalization, inflection, and parsing of number words back to numeric values. The library is designed as a reusable dependency for applications requiring user-friendly formatting. Architecturally, Humanizer follows a strategy/registry pattern: each formatting domain (number-to-words, date humanization, ordinalization, etc.) defines an interface and a default implementation, with locale-specific overrides resolved through a central Configurator. Locale data is defined in YAML files and compiled at build time by a Roslyn source generator into immutable profile classes, keeping runtime algorithms generic and data-driven. The library also includes Roslyn analyzers for API migration and a comprehensive test suite with cross-locale theory tests. Key entry points are extension methods on primitive types (e.g., `42.ToWords()`, `"hello_world".Humanize()`, `DateTime.Now.Humanize()`, `ByteSize.FromBytes(1024).Humanize()`) and the `Configurator` for advanced configuration. The primary data flow is: user calls an extension method → culture resolution → delegation to the appropriate converter/formatter → use of generated profile data to produce localized output. External dependencies are limited to the .NET standard library and CLDR plural rule data.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 5 reusable components found
elixir-gettext/gettext ★ 492 95 APPLICATION

Gettext is an internationalization (i18n) and localization (l10n) library for Elixir applications. It provides macros for marking strings in source code that need translation, extracts these strings into POT (Portable Object Template) files, and merges them with PO (Portable Object) files for different locales. At runtime, it looks up translations based on the current locale and supports features like pluralization, context-based translations, domain-specific messages, and string interpolation with compile-time optimization. The architecture follows a library pattern with clear separation between the API (Gettext module), backend behavior (Gettext.Backend), compilation (Gettext.Compiler), extraction (Gettext.Extractor), merging (Gettext.Merger), and specialized components for interpolation, pluralization, and fuzzy matching.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 3 reusable components found
dustin/go-humanize ★ 4814 261 APPLICATION

go-humanize is a Go library that provides functions to convert numbers, byte sizes, times, ordinals, and SI-prefixed values into human-readable strings and back. It is a pure utility library with no external dependencies beyond the Go standard library. The codebase is organized into a single package with a subpackage for English-specific utilities (pluralization, word series). Key entry points include Bytes, IBytes, Comma, Commaf, Time, Ordinal, SI, and ParseBytes/ParseSI. The library demonstrates solid Go craftsmanship with efficient algorithms (e.g., byte-level comma insertion, logarithmic SI prefix computation) and comprehensive test coverage including fuzz testing. It is widely used (4.8k stars) and actively maintained, though the Go version in CI (1.19) and module requirement (1.16) lag behind current Go releases, indicating moderate technical drift.

RATING: 7.8/10 MAINT: maintained DRIFT: medium
▸ 4 reusable components found
── end of results ──
$ submit: