The current translation is simple and enough, but an improvement doesn't stop it from being perfect. Arabic has suffix/prefix which changes depending on the number.
English: 3 hours ago
Arabic: منذ 3 ساعات مضت
The prefix after the number depends on the number if it's 1, 2, or bigger than 10 or small than 10. The following, let's say, simple code is a way that you can improve the Arabic translation.
// The following applies only if the time is countable, which means that it's not a date, but time offset (3 hours ago, 24 minutes ago, etc)
We will call this countable time as $time
. If the time is just now, you can use the current translation which is "منذ بضعة دقائق" which means a few minutes ago or "منذ قليل" which means "before/just now/a few moments ago"
We will call the type of time $type
, this type will hold the info that the time is hours or minutes or seconds.
if($time === 1){
if($type === "seconds"){
$text = "منذ ثانية"
} else if($type === "minutes"){
$text = "منذ دقيقة"
} else if($type === "hours"){
$text = "منذ ساعة"
} else if($type === "days"){
$text = "منذ يوم"
}
} else if($time === 2){
if($type === "seconds"){
$text = "منذ ثانيتين"
} else if($type === "minutes"){
$text = "منذ دقيقتين"
} else if($type === "hours"){
$text = "منذ ساعتين"
} else if($type === "days"){
$text = "منذ يومين"
}
} else if($time > 10){
if($type === "seconds"){
$text = "منذ $time ثانية"
} else if($type === "minutes"){
$text = "منذ $time دقيقة"
} else if($type === "hours"){
$text = "منذ $time ساعة"
} else if($type === "days"){
$text = "منذ $time يوم"
}
} else if($time <= 10 && $time > 2){
if($type === "seconds"){
$text = "منذ $time ثواني"
} else if($type === "minutes"){
$text = "منذ $time دقائق"
} else if($type === "hours"){
$text = "منذ $time ساعات"
} else if($type === "days"){
$text = "منذ $time أيام"
}
}
Feel free to apply this small improvement. The current translation has only a grammatical issue, other than that, it's usable.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too