Skip to main content
Topic: Who.language.php (Read 2094 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Who.language.php

Just continued translating to Serbian after a very long time. And while i were translating Who file, i stumbled upon two last strings being %1$s

Guess its just some Transifex import bug, and that it wont interfere with how forum is working but maybe we shall fix it?
I just wonder how nobody reported these thing...

Re: Who.language.php

Reply #1
Nope, they are variables, just copy/paste them the way they are.
~ SimplePortal Support Team ~

Re: Who.language.php

Reply #2
In that case they are useless there...or im missing something???

Re: Who.language.php

Reply #3
Like I said... Leave them the way they are! Being a translator (I assume you are, since you said you got on it after a long time), you should know that translations may include variables for stuff like "This topic has X views", where that "X" is actually "%1$s".

Disclaimer: if I sound like a rude @ss, I had a pretty bad day, sorry.
~ SimplePortal Support Team ~

Re: Who.language.php

Reply #4
Don't change or remove them--sprintf() replaces them with variables.

Re: Who.language.php

Reply #5
I know that they are just passing input string to output as there is no text actually being formated (input is passed just the way it is), and thats why i said they are useless...

Anyway i just wanted to report these but if you guys left it that way on purpose (and not being lazy :D) than just say it. xD

Re: Who.language.php

Reply #6
Do you remember the key of the string?
Bugs creator.
Features destroyer.
Template killer.


Re: Who.language.php

Reply #8
@Flavio93Zena key is between $txt[' and '] :)

Re: Who.language.php

Reply #9
Oh he meant that xD Nvm then ;D
~ SimplePortal Support Team ~

Re: Who.language.php

Reply #10
Code: [Select]
// Overrides the already defined strings to get clean results in the table
$txt['today'] = '%1$s';
$txt['yesterday'] = '%1$s';

Thats from downloaded file...

Re: Who.language.php

Reply #11
I wonder why I didn't just search in the file... xD
Forgive me, I had a very "full day" yesterday and I was quite tired. :)

Well, as the notes says, the two variable are already defined elsewhere (index.template.php in that case), and there is the need to override them (yeah, it really need the variable as it is because they are used in the function that prettify the dates and times).
Why didn't I do it in a "source" file, but in a language files? I guess I thought it could be handy have them there just in case someone needs them and that translated these two variables doesn't really take much efforts. LOL

If you think it's better to move them out of the language files it's not a big problem, it can be done in 1.1.
Bugs creator.
Features destroyer.
Template killer.

Re: Who.language.php

Reply #12
Tbh, I'd leave them there due to the way some languages are. You should know very well the way Italian is, it's often different from English, so you might have the variable in one place or another according to the language, not sure how you could fix that if you placed the variable into a source file. You'd have to place another wild card there but it'd annihilate the whole purpose of the "fix".
~ SimplePortal Support Team ~

Re: Who.language.php

Reply #13
In theory it's just for the table, so it may be fine with just the time, but I have to check the code again.
Bugs creator.
Features destroyer.
Template killer.