Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Translation tool] zh #1816

Closed
williamyang233 opened this issue Jul 27, 2019 · 7 comments
Closed

[Translation tool] zh #1816

williamyang233 opened this issue Jul 27, 2019 · 7 comments
Assignees
Labels
details needed We do not have enough input to solve this issue translation Rely to internationalization
Milestone

Comments

@williamyang233
Copy link

williamyang233 commented Jul 27, 2019

English zh comments
2 hours from now 距现在2小时 2小时后
@kylekatarnls kylekatarnls added the translation Rely to internationalization label Jul 27, 2019
@kylekatarnls
Copy link
Collaborator

kylekatarnls commented Jul 27, 2019

Hi @williamyang233 thanks for your help, can you tell me if the current form is wrong 距现在2小时 or just less accurate. Then can you confirm is generic enough for all situations: all units, all quantities, all expressions that would indicate something happen in the future like:

We will lunch in 2 hours from now
Meeting date: 1 day from now
Next Star Wars episode is in 4 months from now
etc.

@kylekatarnls kylekatarnls added the details needed We do not have enough input to solve this issue label Jul 27, 2019
@williamyang233
Copy link
Author

williamyang233 commented Jul 27, 2019

Hi @kylekatarnls .距现在2小时may less accurate in lots of Chinese situations. from now always equal to later in China. But we never say 'from now'.
For example, we don't say 我们将在距现在两小时吃午饭(We will lunch in 2 hours from now) but say ‘我们将在2小时'后'吃午饭’.

@kylekatarnls
Copy link
Collaborator

OK, thank you. So could you confirm as a suffix to the duration text will be OK for all types of duration (from seconds to years, no matter the quantity and/or if it's a composite interval like 1 day 2 hours and 30 minutes)?

@williamyang233
Copy link
Author

Yes!

@kylekatarnls
Copy link
Collaborator

kylekatarnls commented Jul 27, 2019

Thanks. A last thing, I see now we have same word for after and from now, then same word for before and ago. Is there any possible way to differentiate both?

We will lunch in 2 hours from now
We will lunch 2 hours after the meeting

after/before is to compare 2 dates (there is no past/future implication, only a relative comparison)
from now/ago is to compare a date to now (present instant).

@williamyang233
Copy link
Author

Just like Default Value. When there is not comparison, we default to the now as a reference. This is a fixed language expression habit. Actually, 'later/after/from now' are both translated to '后', but we can distinguish by different context.

@kylekatarnls kylekatarnls added this to the 2.22 milestone Jul 28, 2019
@kylekatarnls
Copy link
Collaborator

jpmaga added a commit to jpmaga/Carbon that referenced this issue Jan 5, 2020
* Unbind $this in macros only for PHP < 8

* Privatize loadMixin* method as reserved for mixin() method

* Temporary disabling binding $this/static for PHP 8

* Set specific tests for each macros in PHP 7 and 8

* Persian language localization fixes

* Update Persian translations unit tests

* Update uz_Arab and mzn translations unit tests

* Fix briannesbitt#1816 from now translation in Chinese

* Update zh tests

* Add explicit imports and update composer description

* Cleanup PHPDoc

* Cleanup PHPDoc

* briannesbitt#1782 Fix from_now translation in Chinese

* Add comparison methods for CarbonPeriod bounds

* Add PHPDoc comments

* Allow string and interval in floor, round and ceil

* Implement carbonize() method get a Carbon date from interval/period/any

* Add rounding methods to CarbonInterval/CarbonPeriod

* Fix PHPDoc and add tests

* Fix PHPDoc for Carbon rounding methods

* Fix self references

* Add tests

* Add cast() method and traits mixins to CarbonInterval and CarbonPeriod

* Allow static methods in mixin traits

* Update CarbonInterface PHPDoc

* briannesbitt#1822 Use less short variants for short units in Polish

* Make zh_HK and zh_TW extend Hant/Hans

* Implement contains() and JsonSerializable in CarbonPeriod

* Implement new methods in CarbonPeriod
  - getIncludedStartDate()
  - getIncludedEndDate()
  - follows()
  - isFollowedBy()
  - isConsecutiveWith()

* Simplify duplicate code

* [Travis-CI] Simplify xdebug settings

* Mute deprecation notice

* Ignore mutability in equalTo comparison of periods

* Fix unit tests

* Fix typo

* Fix getIncludedEndDate

* Improve any native PHP classes and sub-classes as cast

* Fix briannesbitt#1831 Refresh global translator caching

* Add cast tests

* Take recurrences DatePeriod incrementation into account

* Mute type wrong PHPStan detections in tests

* Fix briannesbitt#1834 language detection in Lumen

* Make zh_Hans inherit from zh_Hant

* Add altNumbers option to forHumans/diffForHumans

* Fix alternate numbers in hours

* Ensure consistent output typing

* Add tests for altNumbers option briannesbitt#1817

* Fix briannesbitt#1837 fixed from_now translation in Fnnish and add few seconds

* briannesbitt#1837 Update Finnish tests

* Fix briannesbitt#1840 add short form or year for year in Turkish

* Update Turkish unit tests

* Fix PHP 8 compatibility

* Add doc for setDate()

* briannesbitt#1837 Add translation author

* Fix setISODate PHP 8 signature compatibility

* Implement methods that change of signature in PHP 8

* Allow null in __set_state for compatibility with PHP 8

Possible error to fix in PHP:
php/php-src#4526

* Remove temporary fix as fixed in PHP itself:
php/php-src@b17957e

* Remove obsolete tests

* Allow PHP 8 tests to fail until new PHP build is released

* Add test for setISODate()

* Fix Chinese Hant/Hans and meridiem

* [AR] Update with enhancements

* More enhancements

* Update files and fixing test unit

* Fix StyleCI issues

* Fix briannesbitt#1851 Update all Carbon classes on Laravel locale change

* Remove irrelevant test

* Fix PHP 8 compatibility

* Use require everywhere instead of include

* Implement briannesbitt#1856 Allow strings in isSame* methods

* Update PHPDoc and add tests

* Fix 1860 Allow Closure in setTestNow()

* Add create() test in Carbon::setTestNow()

* Fix briannesbitt#1861 Add aUnit option in Thai

* briannesbitt#1861 Add @nithisa authorship

* Allow to control timezone in testNow Closure

* Add PHPDoc

* Synchronize CarbonPeriod and CarbonInterval with Laravel locale

Thanks to @craig-sen to point out this

* Simplify swap expressions

* Reset language for all classes before running Laravel locale test

* Improve period/interval string detection in Carbon::make()

This allows to use make() with customized parse() methods

* Fix briannesbitt#1842 Latvian declension, aUnit and short units

* Add previous author complete name

* Fix zh locales merging

* Remove irrelevant zh_MO overrides

* Corrected sl-SI

* briannesbitt#1828 Make spaces around numbers consistent (both sides or none)

* briannesbitt#1824 Fix interpolations precedence and ordering

* Add missing tests

* Fix code style

* Update Slovenian unit tests

* Apply ago/from_now/before/after declension in multi-parts diffs

* briannesbitt#1849 Add Slovenian short units and "from now" declension

* briannesbitt#1800 Fix Lithuanian declensions

* briannesbitt#1800 Update Lithuanian tests

* briannesbitt#1800 Add Lithuanian calendar and ordinal numbers translations

* briannesbitt#1800 Fix Lithuanian year nominative 11+ plural

* briannesbitt#1800 Decline after translations like from_now ones

* briannesbitt#1800 Fix units plural

* briannesbitt#1857 Fix static methods typing autocompletion

* Add recurrences support in Carbon::toPeriod()

* Fix code style

* briannesbitt#1814 Remove error muter

* Fix briannesbitt#1877 Support timezone short offset format

* Nit: Grammar (briannesbitt#1880)

https://writingexplained.org/a-vs-an-difference

* Use static notation for called class

* Allow to get context from macros using self::this()

* Add missing import

* Remove typehint specificity

* Fix isBefore documentation

There was an error in the documentation of the function isBefore.

2018-07-25 12:45:16 is before 2018-07-25 12:45:18.

* Fix briannesbitt#1886 Support slashes in hasFormat()

* briannesbitt#1886 Add hasFormat() tests

* briannesbitt#1889 Fix Belarusian units translations

* briannesbitt#1893 Fix hour translation to година

* briannesbitt#1889 Fix Belarusian aUnit option translations

* briannesbitt#1893 Fix hour Ukrainian units translations

* briannesbitt#1889 Fix Belarusian aUnit option translations tests

* Add translation authors

* Fix briannesbitt#1902 Make hr_BA inherit hr language

* Replace $this with CarbonInterface in PHPDoc (briannesbitt#1904)

* Replace $this with CarbonInterface in PHPDoc
* [PHPStan] Ignore Carbon interface to instances mismatch

* Fix briannesbitt#1910 seconds Serbo-Croatian translation (briannesbitt#1911)

* Fix briannesbitt#1910 seconds Serbo-Croatian translation

* briannesbitt#356 Add toDateTimeLocalString precision parameter

* Add documentation for getTimeFormatByPrecision

* Add $unitPrecision parameters to relevant methods

Add $unitPrecision parameters to:
- toTimeString
- toDateTimeString
- toIso8601ZuluString

* Update PHPDoc

* Fixed all greater examples

Fixed bad one + changed date to have at least 1 true example

* Fix comparison examples

* Improve typings

* Apply fixes from StyleCI (briannesbitt#15)

* Fix typings

* Fix typehint for static create methods (Fix briannesbitt#1914)

* added new CreateFromFormat method to CarbonInterval

* fixed CarbonInterval::createFromFormat() dockblock

added example
fixed return type

* added CarbonInterval::createFromFormat() tests

* fixed tests inputs

* fixed tests testDefaults() and testNulls()

* Add diff translate

* Add option for rounding in forHumans

* Fix code style

* Implement custom interval formats parsing

* Fix too short variable name

* Use customizable factors for forHumans() rounding

* Add test for gap

* Use dedicated method to get the round factor

* Fix briannesbitt#1927 Finnish future interval translations

* Add rounding methods

* Implement FLOOR and CEIL options

* Fix code style

* Remove unused variable creation

* Remove unused method getRoundFactor

* Fix briannesbitt#1929 Indonesian from now translation

* Allow Symfony 5

* Show difference between FLOOR option and no option

* Fix briannesbitt#1908 Korean spacing and aUnit option

* Add 2.x-dev branch alias

* Added diff before_yesterday and after_tomorrow

* briannesbitt#398 Skip tests with easter_days() if ext-calendar is missing

* [Travis-CI] Remove unneeded dev dependency from the install

* Fix briannesbitt#1941 Symfony 5 compatibility

* Fix briannesbitt#1941 Replace Symfony custom rules with inline syntax

* briannesbitt#1941 Set me and scr locales as aliases

* Compare locales handling aliases

* Fix briannesbitt#1943 Add example for H:s.vi (briannesbitt#1944)

* Fix briannesbitt#1943 Add example for H:s.vi

* Fix briannesbitt#1943 Drop support of .v for PHP < 7.3

* Fix test PHP < 7.2 compatibility

* Add test for unit accumulation in interval rounding

* Fix briannesbitt#1949 Use format('T') to match ISO 8601 timezone format (briannesbitt#1950)

* Fix briannesbitt#1951 createFromTimestamp in DST chnge

* briannesbitt#1951 Add test for createFromTimestampMs

* [Travis-CI] Switch to PHP 7.4 stable release

* briannesbitt#1871 Improve translations using CLDR database (briannesbitt#1955)

* Fix briannesbitt#1953 Align Korean translation on CLDR (briannesbitt#1956)

* Fix briannesbitt#1954 Improvement from-now Armenian translation (briannesbitt#1957)

* Fix briannesbitt#1958 Standardize integer timezone input

* Fix briannesbitt#1958 Remove timezone auto-detection

* Fix PHPDoc alignment

* Add timezone unit tests

* Ease tests with OS locales dependency

* Fix briannesbitt#1968 Turkmen year and short days translations

* Added briannesbitt#1966 Tamil before and after translations

* Update Teso unit tests files

* Use CarbonInterface instead of self for Date trait constant as keys

* Speed up resetMessages

* Update PHPMD

* Add strict restrictions for translator requirements

* Fix Symfony 3 compatibility

* Fix month overflow sensibility of quarter tests

* Use common method for translators able to getLocale()

* Add unit tests for NotLocaleAwareException

* Fix method signature compatibility

* Use include instead of require to not stop the process if lang file is missing

* Fix briannesbitt#1970 Uzbek before/after translations

* Cleanup imports

* Fix briannesbitt#1977 Greek "ago" translation

Co-authored-by: Kyle <kylekatarnls@users.noreply.github.com>
Co-authored-by: Hassan Pezeshk <hpez58@gmail.com>
Co-authored-by: Mohamed Sabil <me@mohamedsabil83.com>
Co-authored-by: Gal Jakič <gal.jakic@gmail.com>
Co-authored-by: Arthur Cinader <700572+acinader@users.noreply.github.com>
Co-authored-by: Marc-Antoine Bouchard Marceau <marcantoine.bouchardm@gmail.com>
Co-authored-by: karlyn33 <karlyn33@users.noreply.github.com>
Co-authored-by: spaceemotion <spaceemotion@users.noreply.github.com>
Co-authored-by: silvio-gratani <42873063+silvio-gratani@users.noreply.github.com>
Co-authored-by: dima-bzz <dimabzz@gmail.com>
Co-authored-by: Tyler Collier <github@tylercollier.com>
Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
details needed We do not have enough input to solve this issue translation Rely to internationalization
Projects
None yet
Development

No branches or pull requests

2 participants