List Info

Thread: samizdat monolanguage-0.1 - features + updates on frontpage are optionally shown monol




samizdat monolanguage-0.1 - features + updates on frontpage are optionally shown monol
user name
2007-08-24 23:30:52
hi samizdat-devel, imc-japan,

This is a patch for samizdat as described below. Personally
i think it's
better to show articles in a lower priority language rather
than not show
them at all. However, i understand that for some people this
is discouraging.

So here's a patch which i think paul from imc japan may
like. 

A working example is to go to the IMC Torun site:

http://torun.indymedia.or
g/

Click on "Deutsch" or [Nihongo] - you'll see a mix
of articles, mostly 
not in these languages.  Now click on "mono" - top
right. For Nihongo, 
at the moment you'll see almost nothing, since almost no
articles have
been translated (sumimasen...). For Deutsch you will see a
small bunch
of articles, both features and non-features.  (If you try
Polish, 
English or French, there should be almost no difference with
mono or without,
since many languages are in several of these languages.)

This solution should hopefully keep everyone happy -
monolinguists and
multilinguists - with just one click difference.


mata ne,
boud



Subject: [patch #6167] monolanguage-0.1 - features + updates
on frontpage are
     optionally shown monolingually


URL:
   <http://sav
annah.nongnu.org/patch/?6167>

                  Summary: monolanguage-0.1 - features +
updates on frontpage
are optionally shown monolingually
                  Project: Samizdat
             Submitted by: boud
             Submitted on: Saturday 08/25/2007 at 04:05
                 Category: None
                 Priority: 5 - Normal
                   Status: Works For Me
                  Privacy: Public
              Assigned to: None
              Open/Closed: Open
          Discussion Lock: Any

    
_______________________________________________________

Details:

SUMMARY

People brought up monolingually get discouraged by seeing
too much
text in other languages on a web page, even if they know
that it's
important information. Since samizdat is highly i18n-ised,
it's not so
easy to monolingualise it, because then users will lose a
lot of the
structure to the site and access to information. This patch
provides
the user with a "mono" button (top-right) to force
monolinguality (a
cookie is set) for the features and updates, i.e. the middle
and
right-hand columns of the frontpage. If nobody has
translated ordinary
or feature articles into the preferred language of the user,
then s/he
will see a nearly empty page after clicking
"mono".  If s/he decides to
cross the border by clicking "multi", then
everything returns to normal,
with articles being listed as much as possible in the
preferred language.

CONFIG:
* config: Sysadmin must put the line

monolanguage: true

in the site or default yaml file.


HOW IT WORKS:
* member_controller.rb - get monolanguage parameter
    /member/set?lang=monolanguage

* request.rb  - request.monolanguage?  method

* frontpage_controller.rb

If monolanguage is set, then collect_features and
collect_updates
are modified to list *only*
* features (updates) which are original (parent) articles in
the preferred
language
* features (updates) which are child articles in the
preferred language
and which are related to Focus::Translation
and then sort them by decreasing ID.

Forcing to monolinguality is not done elsewhere in the 0.1
patch,
but hopefully this should be enough to satisfy people
annoyed at too
much text that they don't understand.

The language list has "| mono multi" added with
appropriate html markup.
The presently valid one is strong and the other one is an a
href.
(i also un-a-href-ed the presently preferred language - this
is not a major
issue, but i thought there's no need to propose to people to
click on
something which will have no effect.)

The cache keys for collect_features, collect_updates and
also the general
frontpage cache key have had labels added in order that
caching does not
prevent showing changes to the user.


Possible TODO: limit ends up being evaluated at somewhere
between
limit and 2*limit because of originals + translations -
there could be
many or few of either. i don't know how important this is to
people's
preferences, but it's something that could be tidied up.


    
_______________________________________________________

File Attachments:

-------------------------------------------------------
Date: Saturday 08/25/2007 at 04:05  Name:
070825_monolanguage-0.1  Size: 8kB
  By: boud

<http://savannah.nongnu.org/patch/download.php?fil
e_id=13789>

    
_______________________________________________________

Reply to this item at:
   <http://sav
annah.nongnu.org/patch/?6167>

_______________________________________________
   Message sent via/by Savannah
   http://savannah.nongnu.or
g/



_______________________________________________
samizdat-devel mailing list
samizdat-develnongnu.org
http://lists.nongnu.org/mailman/listinfo/samizdat-devel

Re: monolanguage-0.1 - features + updates on frontpage are option
user name
2007-08-25 05:19:32
hi again

On Sat, 25 Aug 2007, boud wrote:

> hi samizdat-devel, imc-japan,
>
> This is a patch for samizdat as described below.
Personally i think it's
> better to show articles in a lower priority language
rather than not show
> them at all. However, i understand that for some people
this is discouraging.
>
> So here's a patch which i think paul from imc japan may
like. 
>
> A working example is to go to the IMC Torun site:
>
> http://torun.indymedia.or
g/
>
> Click on "Deutsch" or [Nihongo] - you'll see
a mix of articles, mostly
> not in these languages.  Now click on "mono"
- top right. For Nihongo,
> at the moment you'll see almost nothing, since almost
no articles have
> been translated (sumimasen...). For Deutsch you will
see a small bunch
> of articles, both features and non-features.  (If you
try Polish,
> English or French, there should be almost no difference
with mono or without,
> since many languages are in several of these
languages.)
>
> This solution should hopefully keep everyone happy -
monolinguists and
> multilinguists - with just one click difference.


The patch version 0.1 does not "monolingualise"
(ignore non-preferred
language versions) of "theme" articles which are
calendar dates and are
shown in the centre column with version 0.5 of the calendar
patch.

A comment that this should/could be fixed has been added to
the entry 
for this patch:
http
s://savannah.nongnu.org/patch/index.php?6167

These type of entries (you can see one example on torun.indy
right now)
normally only take up a few lines, so provided that several
features have
been translated into the preferred language (not the case
for Nihongo 
on torun.indy right now, but is the case for de/en/fr), this
should 
hopefully not upset the monolingual reader too much.


mata
boud


_______________________________________________
samizdat-devel mailing list
samizdat-develnongnu.org
http://lists.nongnu.org/mailman/listinfo/samizdat-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )