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

relative datetime and translation #3355

Closed
Jimmi08 opened this issue Aug 7, 2018 · 7 comments
Closed

relative datetime and translation #3355

Jimmi08 opened this issue Aug 7, 2018 · 7 comments
Assignees
Labels
type: enhancement An improvement or new feature request
Milestone

Comments

@Jimmi08
Copy link
Contributor

Jimmi08 commented Aug 7, 2018

if you use relative format of date, this is used:

return ($mode ? $outputArray : implode(", ", $outputArray) . " " . LANDT_AGO);

Order in my and Czech language is different
LANDT_AGO + relative date.

Is possible to add this to prefs?

@Moc Moc added this to the e107 2.1.9 milestone Aug 7, 2018
@Moc Moc added the type: enhancement An improvement or new feature request label Aug 7, 2018
@CaMer0n
Copy link
Member

CaMer0n commented Aug 8, 2018

@Jimmi08 This should have been made like this.. define("LANDT_XAGO", "[x] ago");
We'll have to introduce a new LAN and use this existing one as a fallback.

@Jimmi08
Copy link
Contributor Author

Jimmi08 commented Aug 8, 2018

Thanks. I fixed it by using different word. Now it doesn't look stupid, just weird. So it can wait.

@CaMer0n CaMer0n modified the milestones: e107 2.1.9, e107 2.2.0 Aug 22, 2018
@Moc Moc self-assigned this Feb 1, 2019
@Moc
Copy link
Member

Moc commented Feb 9, 2019

@CaMer0n Why do we need a fallback? Can we not change it like this?

define("LANDT_XAGO", "[x] ago");
define("LANDT_INX", "in [x]");

and

if($older_date < $newer_date) // past
{

	$replace = implode(", ", $ret);
	$xago = e107::getParser()->lanVars(LANDT_XAGO, $replace);
	return ($mode ? $ret : $xago);
}
else // future
{
	$replace = implode(", ", $ret);
	$inx = e107::getParser()->lanVars(LANDT_INX, $replace);
	return ($mode ? $ret : $inx);
}

@CaMer0n
Copy link
Member

CaMer0n commented Feb 10, 2019

Looks good @Moc ! 👍

@Moc Moc closed this as completed in 2f67965 Feb 11, 2019
@KiraTheUltimate
Copy link

@CaMer0n @Moc
With the latest github update:

kepkivagas

@Moc Moc reopened this Feb 17, 2019
@Moc
Copy link
Member

Moc commented Feb 17, 2019

@KiraTheUltimate This is probably because your language pack has not been updated yet. When you switch to the English language, what do you see?

@KiraTheUltimate
Copy link

It's good, thank you, then I waiting the hungarian language update.

@yesszus

@Moc Moc closed this as completed Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement An improvement or new feature request
Projects
None yet
Development

No branches or pull requests

4 participants