Tom Hughes [Wed, 15 Jul 2009 23:42:56 +0000 (23:42 +0000)]
Fix compatible_language_from in the http_accept_language plugin to
correctly follow the RFC 2616 language selection algorithm and then
revert to the previous way of selecting languages.
Tom Hughes [Wed, 15 Jul 2009 23:29:07 +0000 (23:29 +0000)]
Try preferred_language_from as it looks for an exact match - only if that
fails do we fall back to compatible_language_from which will take any
language where the first token matches. Fixes #2069.
New Potlatch translations pulled in as a result of http://wiki.openstreetmap.org/index.php?title=Template%3APotlatch%2FTranslation&diff=302859&oldid=301148
Potlatch's i18n support predates our Rails i18n effort, so it was
still doing its own language detection.
Scrap that and use I18n.locale instead, now Potlatch is guaranteed to
use whatever translation the rest of the site uses.
I've tested this by switching the language in preferences back and
forth, and also ensured that Potlatch will fall back on English if the
specified language doesn't exist in its list of translations.
Fixed a bug in how fields in /message/new were being pre-filled out.
When someone went to /message/new/:user the "Subject" are would be
pre-filled out with t('message.new.title'). The problem was that the
@title template variable was being used for two purposes, to set the
HTML <title> AND to pre-fill out the subject.
We don't always want these two to be the same, but sometimes we
do. E.g. when someone replies to a diary entry and visits
/message/new/:user?title=Foo we want Foo in the <title> and in the
pre-filled out Subject, and the same goes for replying to a message.
So I've split up the @title variable into @title and @subject.
Matt Amos [Thu, 2 Jul 2009 16:40:29 +0000 (16:40 +0000)]
Changed shortlink zoom level correction char to '-', as this seems to fare better with twitter et al.'s URL highlighting. Decoder is backwards-compatible with the old system.
Tom Hughes [Mon, 29 Jun 2009 17:11:50 +0000 (17:11 +0000)]
Go back to using < and > for navigation instead of the nasty looking
unicode arrows which aren't at all consistent with the use of | as the
separator.
Also remove some of the translations - there is no reason that I can
see to allow translations to completely change how the navigation control
is laid out.
Add B000FTFT (as well as B000FTF) to the list of layers we should
ignore when constructing the shortlink.
The shortlink was also broken for the new /?{node,way,relation}=id
construct since the code assumed that all URL parameters that weren't
lat/lon/zoom/layers could be safely ignored. I've added
node/way/relation to that list but for future-proofness it might be
better to simply check if there's anything left in ''args'' that we
don't know how to encode, rather than checking on values we know about
now.
I forgot to set fillColor/fillOpacity in commit [16214]. Without it
any area being rendered by OpenLayers would turn into a black hole
since the default fillOpacity is 100%.
The default OpenLayers.Layer.GML style can be nearly invisible when
viewed on the main map.
Set a style that's blue (since not a lot of things on the map are
blue), with strokeWidth 3 and opacity 50%. It makes things visible
enough without being too intrusive.
Make the printable_name() function call i18n.t to translate its
output. Makes e.g. "#{name}, v#{object.version.to_s}" which is used in
the changeset browser translatable.
I'm still not happy with how the anchor is constructed. we're linking
from /browse/changeset/1234 to e.g. node "[[366672999, v1]]" even
though the page we're linking to might take us to that node at version
2. The link should be "[[366672999]], v1" instead.