This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from LaravelRUS/master
Merge from master
- Loading branch information
Showing
24 changed files
with
398 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
18 changes: 18 additions & 0 deletions
18
src/Laravelrus/LocalizedCarbon/DiffFormatters/AfDiffFormatter.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php namespace Laravelrus\LocalizedCarbon\DiffFormatters; | ||
|
||
class AfDiffFormatter implements DiffFormatterInterface { | ||
|
||
public function format($isNow, $isFuture, $delta, $unit) { | ||
$txt = $delta . ' ' . $unit; | ||
$txt .= $delta == 1 ? '' : 's'; | ||
|
||
if ($isNow) { | ||
$txt .= ($isFuture) ? ' van nou af' : ' terug'; | ||
return $txt; | ||
} | ||
|
||
$txt .= ($isFuture) ? ' na' : ' voor'; | ||
return $txt; | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/Laravelrus/LocalizedCarbon/DiffFormatters/FaDiffFotmatter.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
namespace Laravelrus\LocalizedCarbon\DiffFormatters; | ||
class FaDiffFormatter implements DiffFormatterInterface { | ||
public function format($isNow, $isFuture, $delta, $unit) { | ||
$txt = $delta . ' ' . $unit; | ||
if ($isNow) { | ||
$txt .= ($isFuture) ? ' از حالا' : ' گذشته'; | ||
return $txt; | ||
} | ||
$txt .= ($isFuture) ? ' بعد' : ' قبل'; | ||
return $txt; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/Laravelrus/LocalizedCarbon/DiffFormatters/ItDiffFormatter.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php namespace Laravelrus\LocalizedCarbon\DiffFormatters; | ||
class ItDiffFormatter implements DiffFormatterInterface { | ||
public function format($isNow, $isFuture, $delta, $unit) { | ||
$unitStr = \Lang::choice("localized-carbon::units." . $unit, $delta, array(), 'it'); | ||
if($delta == 1){ | ||
switch($unit){ | ||
case 'hour': | ||
$delta = 'Un\''; | ||
break; | ||
case 'week': | ||
$delta = 'Una'; | ||
break; | ||
default: | ||
$delta = 'Un'; | ||
break; | ||
} | ||
} | ||
$txt = $delta . ' ' . $unitStr; | ||
if ($isNow) { | ||
if($isFuture){ | ||
$pre= 'Tra '; | ||
return $pre . strtolower($txt); | ||
} | ||
else{ | ||
$suffix= ' fa'; | ||
return $txt . $suffix; | ||
} | ||
} | ||
return $txt .= ($isFuture) ? ' dopo' : ' prima'; | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
src/Laravelrus/LocalizedCarbon/DiffFormatters/RoDiffFormatter.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
namespace Laravelrus\LocalizedCarbon\DiffFormatters; | ||
|
||
|
||
class RoDiffFormatter implements DiffFormatterInterface { | ||
|
||
public function format($isNow, $isFuture, $delta, $unit) { | ||
$unitStr = \Lang::choice("localized-carbon::units." . $unit, $delta, array(), 'ro'); | ||
|
||
if ($isNow) { | ||
$pre = $isFuture ? 'peste ' : 'acum '; | ||
$suffix = ''; | ||
|
||
switch ($unit) { | ||
case 'second': $deltaInWords = 'o'; break; | ||
case 'minute': $deltaInWords = 'un'; break; | ||
case 'hour': $deltaInWords = 'o'; break; | ||
case 'day': $deltaInWords = 'o'; break; | ||
case 'week': $deltaInWords = 'o'; break; | ||
case 'month': $deltaInWords = 'o'; break; | ||
case 'year': $deltaInWords = 'un'; break; | ||
} | ||
|
||
if($delta == 1) { | ||
$delta = $deltaInWords; | ||
$suffix = ''; | ||
} | ||
|
||
return $pre . $delta . ' ' . $unitStr . $suffix; | ||
} else { | ||
$post = ($isFuture) ? ' înainte' : ' după'; | ||
|
||
if($delta == 1) { | ||
switch ($unit) { | ||
case 'second': $delta = 'o'; break; | ||
case 'minute': $delta = 'un'; break; | ||
case 'hour': $delta = 'o'; break; | ||
case 'day': $delta = 'o'; break; | ||
case 'week': $delta = 'o'; break; | ||
case 'month': $delta = 'o'; break; | ||
case 'year': $delta = 'un'; break; | ||
} | ||
} | ||
|
||
return $delta . ' ' . $unitStr . $post; | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Laravelrus/LocalizedCarbon/DiffFormatters/SvDiffFormatter.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php namespace Laravelrus\LocalizedCarbon\DiffFormatters; | ||
|
||
|
||
class SvDiffFormatter implements DiffFormatterInterface { | ||
|
||
public function format($isNow, $isFuture, $delta, $unit) { | ||
$txt = \Lang::choice("localized-carbon::units." . $unit, $delta, array(), 'sv'); | ||
$txt = $delta.' '.$txt; | ||
if ($isNow) { | ||
$txt .= ($isFuture) ? ' från nu' : ' sedan'; | ||
return 'för '.$txt; | ||
} | ||
$txt .= ($isFuture) ? ' efter' : ' före'; | ||
return 'om '.$txt; | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
return array( | ||
"januarie" => "Januarie", | ||
"februarie" => "Februarie", | ||
"maart" => "Maart", | ||
"april" => "April", | ||
"mei" => "Mei", | ||
"junie" => "Junie", | ||
"julie" => "Julie", | ||
"augustus" => "Augustus", | ||
"september" => "September", | ||
"oktober" => "Oktober", | ||
"november" => "November", | ||
"december" => "December", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
return array( | ||
"second" => "sekonde|sekondes", | ||
"minute" => "minuut|minute", | ||
"hour" => "uur|ure", | ||
"day" => "dag|dae", | ||
"week" => "week|weke", | ||
"month" => "maand|maande", | ||
"year" => "jaar|jare", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
// Created by : Abdellah Chadidi => https://github.com/chadidi | ||
return array( | ||
"january" => "يناير", | ||
"february" => "فبراير", | ||
"march" => "مارس", | ||
"april" => "أبريل", | ||
"may" => "مايو", | ||
"june" => "يونيو", | ||
"july" => "يوليو", | ||
"august" => "أغسطس", | ||
"september" => "سبتمبر", | ||
"october" => "أكتوبر", | ||
"november" => "نوفمبر", | ||
"december" => "ديسمبر", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?php | ||
|
||
// Created by : Abdellah Chadidi => https://github.com/chadidi | ||
return array( | ||
"second" => "ثانية", | ||
"minute" => "[0,10] دقائق|[11,Inf] دقيقة", | ||
"hour" => "[0,10] ساعات|[11,Inf] ساعة", | ||
"day" => "[0,10] أيام|[11,Inf] يوما", | ||
"week" => "[0,10] أسابيع|[11,Inf] أسبوعا", | ||
"month" => "[0,10] أشهر|[11,Inf] شهرا", | ||
"year" => "[0,10] سنوات|[11,Inf] سنة", | ||
"second" => "[0,1] ثَانِيَة|{2} ثَانِيَتَيْن|[3,10]:count ثَوَان|[11,Inf]:count ثَانِيَة", | ||
"minute" => "[0,1] دَقِيقَة|{2} دَقِيقَتَيْن|[3,10]:count دَقَائِق|[11,Inf]:count دَقِيقَة", | ||
"hour" => "[0,1] سَاعَة|{2} سَاعَتَيْن|[3,10]:count سَاعَات|[11,Inf]:count سَاعَة", | ||
"day" => "[0,1] يَوْم|{2} يَوْمَيْن|[3,10]:count أَيَّام|[11,Inf] يَوْم", | ||
"week" => "[0,1] أُسْبُوع|{2} أُسْبُوعَيْن|[3,10]:count أَسَابِيع|[11,Inf]:count أُسْبُوع", | ||
"month" => "[0,1] شَهْرَ|{2} شَهْرَيْن|[3,10]:count أَشْهُر|[11,Inf]:count شَهْرَ", | ||
"year" => "[0,1] سَنَة|{2} سَنَتَيْن|[3,10]:count سَنَوَات|[11,Inf]:count سَنَة", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
return array( | ||
"january" => "Януари", | ||
"february" => "Февруари", | ||
"march" => "Март", | ||
"april" => "Април", | ||
"may" => "Май", | ||
"june" => "Юни", | ||
"july" => "Юли", | ||
"august" => "Август", | ||
"september" => "Септември", | ||
"october" => "Октомври", | ||
"november" => "Ноември", | ||
"december" => "Декември", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
return array( | ||
"january" => "ژانویه", | ||
"february" => "فوریه", | ||
"march" => "مارچ", | ||
"april" => "آپریل", | ||
"may" => "می", | ||
"june" => "جون", | ||
"july" => "جولای", | ||
"august" => "آگوست", | ||
"september" => "سپتامبر", | ||
"october" => "اکتبر", | ||
"november" => "نوامبر", | ||
"december" => "دسامبر", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
return array( | ||
"second" => "ثانیه", | ||
"minute" => "دقیقه", | ||
"hour" => "ساعت", | ||
"day" => "روز", | ||
"week" => "هفته", | ||
"month" => "ماه", | ||
"year" => "سال", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
return array( | ||
'january' => 'Janvier', | ||
'february' => 'Février', | ||
'march' => 'Mars', | ||
'april' => 'Avril', | ||
'may' => 'Mai', | ||
'june' => 'Juin', | ||
'july' => 'Juillet', | ||
'august' => 'Août', | ||
'september' => 'Septembre', | ||
'october' => 'Octobre', | ||
'november' => 'Novembre', | ||
'december' => 'Décembre' | ||
); | ||
?> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
return array( | ||
"january" => "Gennaio", | ||
"february" => "Febbraio", | ||
"march" => "Marzo", | ||
"april" => "Aprile", | ||
"may" => "Maggio", | ||
"june" => "Giugno", | ||
"july" => "Luglio", | ||
"august" => "Agosto", | ||
"september" => "Settembre", | ||
"october" => "Ottobre", | ||
"november" => "Novembre", | ||
"december" => "Dicembre", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
return array( | ||
"second" => "secondo|secondi", | ||
"minute" => "minuto|minuti", | ||
"hour" => "ora|ore", | ||
"day" => "giorno|giorni", | ||
"week" => "settimana|settimane", | ||
"month" => "mese|mesi", | ||
"year" => "anno|anni", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
return array( | ||
"january" => "januari", | ||
"february" => "februari", | ||
"march" => "maart", | ||
"april" => "april", | ||
"may" => "mei", | ||
"june" => "juni", | ||
"july" => "juli", | ||
"august" => "augustus", | ||
"september" => "september", | ||
"october" => "oktober", | ||
"november" => "november", | ||
"december" => "december", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
return array( | ||
"january" => "Ianuarie", | ||
"february" => "Februarie", | ||
"march" => "Martie", | ||
"april" => "Aprilie", | ||
"may" => "Mai", | ||
"june" => "Iunie", | ||
"july" => "Iulie", | ||
"august" => "August", | ||
"september" => "Septembrie", | ||
"october" => "Octombrie", | ||
"november" => "Noiembrie", | ||
"december" => "Decembrie", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
return array( | ||
"second" => "secundă|secunde|secunde", | ||
"minute" => "minut|minute|minute", | ||
"hour" => "oră|ore|ore", | ||
"day" => "zi|zile|zile", | ||
"week" => "săptămână|săptămâni|săptămâni", | ||
"month" => "lună|luni|luni", | ||
"year" => "an|ani|ani", | ||
); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
return array( | ||
"january" => "Januari", | ||
"february" => "Februari", | ||
"march" => "Mars", | ||
"april" => "April", | ||
"may" => "Maj", | ||
"june" => "Juni", | ||
"july" => "Juli", | ||
"august" => "Augusti", | ||
"september" => "September", | ||
"october" => "Oktober", | ||
"november" => "November", | ||
"december" => "December", | ||
); |
Oops, something went wrong.