samizdat-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

samizdat [patch #6167] monolanguage-0.1 - features + updates on frontpag


From: boud
Subject: samizdat [patch #6167] monolanguage-0.1 - features + updates on frontpage are optionally shown monolingually (fwd)
Date: Sat, 25 Aug 2007 06:30:52 +0200 (CEST)

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.org/

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://savannah.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?file_id=13789>

    _______________________________________________________

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

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]