Add more translations - #101
Open
alexxiy wants to merge 3 commits into
Open
Conversation
Add translations: - Azerbaijani - Belarusian - Portuguese
Fork of jimmiw/php-time-ago, rewritten for PHP 8.5. - Namespace Alexxiy\TimeIntervals mapped to src/; entry class is now IntervalFormatter, since TimeAgo described only one of three tenses. - Tense (past/future/plain) and Style (full/short) as orthogonal axes. - CLDR plural rules; Russian says 2 дня / 5 дней / 21 день. - Fixes: counted buckets rendered "1 days ago", Arabic dropped its counts, never was missing from 17 languages, "about one day" was the word for yesterday in seven, and ten further defects found in review. - strict_types everywhere, PHPStan level max, 7478 tests at 100% coverage. See CHANGELOG.md and TRANSLATIONS.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every threshold is now the point at which the rounded count changes, replacing a mix of rounded and floored rules inherited from Rails. - "about one X" covered [1X, 2X): 59 days read "about 1 month", 47 hours read "1 day", 23 months read "about 1 year". Each is now centred. - Counts floored, so values read up to a whole unit low: 2m40s was "2 minutes", 91 days was "2 months". - The month handover was a fixed day count while months are calendar units, so 1 Feb - 1 Apr read "about 1 month" in 2021 but "2 months" in 2024. It now reads "2 months" in both. "over N years" counts whole years elapsed, never rounded months, so it cannot overstate: 1 year 11 months reads "over 1 year". No API and no translation string changed; what changed is which phrase an interval selects. Adds monotonicity and no-overstatement property tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add translations: