Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Arantor
5911
Features / Re: Birthday, calendar, plugin, core [VOTE NOW!]
« on October 13th, 2011, 12:41 AM »
That's the thing, I actually need to do some right now, mostly because it's how I'm finding bugs in the plugin manager, as well as making sure there are hooks in meaningful places.
Posted: October 13th, 2011, 12:19 AM

Just that right now, after today's fandango, I'm a bit tired before carrying on with the split of the birthday plugin, especially because of the way the email templates are physically handled, and what looks like I'll have to re-engineer the sending process to get around it, which probably means reformatting all the email templates to be conventional language strings.

Speaking of which, the entire way email templates are done is a bit ridiculous, and they can't even be edited in the language editor :/
5912
The Pub / Re: English British support
« on October 13th, 2011, 12:39 AM »
Quote
$txt = unserialize('...') is only 10% faster than the regular version on index.french.php. Although this is about 50% faster:
We can only use that once we have built the final array, we cannot use it to combine English with other elements during the build process.

For any given arrays, if the same (non indexed) key occurs in both arrays, the left hand array element will be used, as per http://php.net/manual/en/language.operators.array.php so if we load English into $txt, then use += to attempt to overlay another language, it's going to fail.

Also note that there are some instances where strings are actually reused without necessarily being aware of it.
Quote
No no, I do mean having the version number in the file -- I just mean we should have a script, on our side, that will go through the language files and increase the version number inside the files if they're found to have been changed against our reference files
I'm thinking instead to attach a script to the post_commit hook of SVN, called on any given commit. If the commit updates anything in /languages/, we have an instant log that something needs to be done. It's all automatable. :D
5913
Features / Re: Birthday, calendar, plugin, core [VOTE NOW!]
« on October 13th, 2011, 12:08 AM »
Heh, I was more curious as to what you might have had in mind, knowing that more 'core' things such as PMs and the memberlist were suggested as possible candidates.
5914
Features / Re: New revs - Public comments
« on October 13th, 2011, 12:08 AM »
Quote
Why not..?
Do you think {scripturl} is likelier to be used in a post? Well, if it's used, it's only to explain users what it's for, or post code samples etc... <we:script> would be in the same situation, wouldn't it? (Also, it would be caught by the macro replacement code AFAIK...)
It's likely to be used if someone posts code. <we:*> on the other hand won't be caught by the replace filter because it'll have been converted to entities and thus the raw form is never exposed to the replacer.
Quote
QueryString....?
Isn't QueryString.php where $scripturl is first defined?
5915
Features / Re: New revs - Public comments
« on October 12th, 2011, 10:50 PM »
@stackmouse, this is exactly we've done work on it lately, compounded strings are workable in English but no other language.

@Nao, that's why I suggested doing it with a <we> variable ;) it won't ever be used in posts directly.

But if it's a global replace, you can replace any instance of scripturl throughout the entire source, except for its definition in QueryString, and the actual replace itself.
5916
Features / Re: Birthday, calendar, plugin, core [VOTE NOW!]
« on October 12th, 2011, 10:46 PM »
Such as?
5917
The Pub / Re: English British support
« on October 12th, 2011, 09:58 PM »
How different are they? Is it spelling variations like English vs British? Grammar changes?
5918
Features / Re: Birthday, calendar, plugin, core [VOTE NOW!]
« on October 12th, 2011, 09:57 PM »
It did occur to me, especially as there's a higher percentage of BSD code compared to the rest of Wedge, there's less we've done to it.
5919
Features / Re: Birthday, calendar, plugin, core [VOTE NOW!]
« on October 12th, 2011, 09:35 PM »
And it stands better chance of getting development as a plugin than a core feature, daft as it sounds...
5920
Features / Re: New revs - Public comments
« on October 12th, 2011, 09:33 PM »
Quote
We'd only need to call complex_string on strings that we KNOW to have variables in them. In effect, it doesn't represent a lot of strings.
$scripturl is the special case, because it's used in a ton of strings as well as throughout the source.

Things like boardurl are rare enough that you can just do a str_replace as needed; no need to wrap it in a special function.

But it doesn't require a page wide regex, just a page wide str_replace as it's constant and source level.
Quote
I'd tend to say that it's up to the server to translate that to the current locale
Yup. I seem to recall setting up a setlocale call for that purpose, assuming LC_TIME or LC_ALL is still passed. Again this is something I'd like more input because I don't know about other languages and cultures.


Oh, and last I heard, the i18n team is now called Localizers, which isn't really much better, and while I do remember debates about languages, I don't remember much strong debate about how to practically approach these matters, almost as if they were just accepted as faults that weren't going to be fixed. IIRC, the only reason the AM/PM thing happened was because a real[1] team member kicked up a fuss.


Lastly, I wouldn't worry about RTL too much at this time.
 1. The Internationalizers/Localizers have never been considered a real team, even if some tried to treat them as valuable equals. In all honesty I think Akyhne has more power as a consulting dev than he did as Lead Internationalizers.
5921
The Pub / Re: English British support
« on October 12th, 2011, 09:19 PM »
Quote from ~DS~ on October 12th, 2011, 08:26 PM
I never understood how it works if pirate and yoda are in english? They are automatically translated for you on post or...?
That's the thing, it's no different to the code as, say, English British vs English, or Portuguese Brazilian vs Portuguese PT. It's the language around the posts, not the posts themselves...
Quote
(And even better -- cache the resulting language...)
Question. Let's say we have arbitrary language x, based on language y, neither of which is English. Do we load English, then y then x?

Caching is a tricky subject for languages. Caching into the cache folder in the usual fashion? If so, I'm not clear how it helps performance.

Also, other than English British, are there any other language packs that are variants of each other? I remember discussing the above mentioned Portuguese pack, given that the two packs are even closer than British is to English... Is it worth the effort to build something to support it rather than just leveraging a comfortable detail of implementation? If no language is really going to use it, I'd say it wasn't worth the effort.
Quote
(e.g. we just do a md5 of the contents, after removing comments and whitespace.)
No, we should store it as a version number in the file rather than rely on contents as unless we store changes in the DB, the language files should be considered volatile.

Elsewhere I mentioned gathering a list of the languages in a manner that encourages loading the files themselves to get the language's own name from it. Putting the version number would be trivial to load at that point.

As far as variables, I'd say it's dependent on the nature, you don't add per document or brute force changes to strings when they apply to individual strings; I wouldn't throw every string through a test for boardurl for example.
5922
The Pub / Re: English British support
« on October 12th, 2011, 08:09 PM »
I know :P From my POV, anything that requires altering a lot of language strings is effectively a language pack candidate.
5923
The Pub / Re: English British support
« on October 12th, 2011, 07:36 PM »
Tempt me, you should not.
5924
Features / Re: New revs - Public comments
« on October 12th, 2011, 04:36 PM »
Quote
Regarding the latest few commits... Wouldn't it make sense to have a function like, 'complex_string', whose purpose would be to do the common string replacements? (boardurl, scripturl...)
It would indeed be slower, though I'd suspect it would be much more convenient to use something like <we:script> and replace it in the buffer at the end. It would certainly avoid juggling the variable about so much.

For other stuff like $boardurl, I wouldn't bother, it's just not used enough. But for $scripturl, there is a practical convenience vs performance decision to be made.
Quote
I totally forgot that this was recent, indeed...
I don't even know why people would need to translate this, meh.
It's not so much that some people need to translate it, it's more than some languages simply have no concept of am/pm, and use 24 hour systems instead. In fact, I think it is a peculiarity of English the more I read up on it.
Quote
Or simply remove the comma entirely..?
I really like not having the year when it's a recent post... It's halfway between hardcoded and dynamic dates. And it saves precious space.
Hmm, I'm not actually that fussed personally. I'd say that whatever is reliably going to strip it without leaving too much fluff is fine.
Quote
We could also kill $txt['by']
I want to. I just haven't gotten round to it yet because it's used in a lot of places, just as $txt['in'], $txt['on'] and similar joining clauses are. I'd rather strip them all and use properly constructed phrases, even if it is slower.
Quote
t's just that in Japanese, the 'by' is usually shown after the name. But I think it can be put before the name as well, if needed. It just doesn't feel as natural. (And yeah, I know, even SMF doesn't have a Japanese version... But Kyôdai Mahjongg does
http://download.simplemachines.org/?smflanguages disagrees with you.

What would really help is if I could talk to people who know more languages; ideally I'd like to speak to people who know Chinese, Russian and Arabic. While I'm aware it's a gross simplification, Japanese, Chinese, Russian and Arabic between them hit up all the key problems in the language files.

Internationalisation is an incredibly complex art, and if I'm honest it's not one I'm that familiar with, but I'd like to think that my gut instinct on the practicalities of it are serving Wedge well.

For example, I'm aware of the whole use of : in strings in the admin panel and other places. My gut instinct tells me that they should be in the language file, not the template, because from my understanding of RTL and the way it's currently handled, you'd risk ending up with <setting> <string>: rather than the more correct <setting> :<string>. But I don't know any RTL languages, my knowledge of French is limited and rusty, my knowledge of other languages even more so (but it's enough to recognise that the constructions used currently do not work consistently outside English)
5925
Off-topic / Re: Post count fever
« on October 12th, 2011, 03:46 PM »
Hmm, maybe, we'll see :P

And yes, while I only removed it yesterday, I could have sworn it was removed beforehand.