From lojban+bncCIfYkcm2DRC56-jqBBoEDMnRyQ@googlegroups.com Tue Feb 15 00:14:03 2011 Received: from mail-ww0-f61.google.com ([74.125.82.61]) by chain.digitalkingdom.org with esmtp (Exim 4.72) (envelope-from ) id 1PpG2o-0008OV-DN; Tue, 15 Feb 2011 00:14:03 -0800 Received: by wwb34 with SMTP id 34sf6300271wwb.16 for ; Tue, 15 Feb 2011 00:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:x-beenthere:received-spf:mime-version :in-reply-to:references:date:message-id:subject:from:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; bh=nlojtZf/RidyvhptLYyAtTKCKFAU2a3o9TtaW9S5fF0=; b=1694C3Z2M8Kz2YNVr1F92/qb4aMqFZKjIUlj4p1Vxsi5S0SkdoBPcMpCkLNkG+zi6y LfmaV2o41Y4/vwjXlGHOQooiLWTNX7VQgY0FseWenJ/FDCFsfqbNcSF9jOGjyuh9R1fH vGODQRfV2RNiH+fagC34ufSYOi+rc1FHZn0kY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:in-reply-to:references:date :message-id:subject:from:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; b=EHjYgYTu0+GhWGzGj8NT+y4xBlV8PQ2RUqE1X+i6cqWYGqs8gmUWhvdsHFW3e35uZm POO8PsUTcNJuawfj4jbmvrk/UYZvIX0XvujcptVn4Yx8grpWDSdbRvWVp+/U7g4l97ko YckL3hWc2rjXe4jmvK942ACnEQDEqpPuVKnE8= Received: by 10.216.11.137 with SMTP id 9mr106406wex.28.1297757625843; Tue, 15 Feb 2011 00:13:45 -0800 (PST) X-BeenThere: lojban@googlegroups.com Received: by 10.216.162.73 with SMTP id x51ls2096739wek.3.p; Tue, 15 Feb 2011 00:13:45 -0800 (PST) Received: by 10.216.181.202 with SMTP id l52mr289447wem.8.1297757624941; Tue, 15 Feb 2011 00:13:44 -0800 (PST) Received: by 10.216.181.202 with SMTP id l52mr289446wem.8.1297757624897; Tue, 15 Feb 2011 00:13:44 -0800 (PST) Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by gmr-mx.google.com with ESMTPS id f60si403964wes.10.2011.02.15.00.13.43 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Feb 2011 00:13:43 -0800 (PST) Received-SPF: pass (google.com: domain of veijo.vilva@gmail.com designates 74.125.82.172 as permitted sender) client-ip=74.125.82.172; Received: by wyf23 with SMTP id 23so5540692wyf.17 for ; Tue, 15 Feb 2011 00:13:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.180.77 with SMTP id i55mr3822976wem.76.1297757622854; Tue, 15 Feb 2011 00:13:42 -0800 (PST) Received: by 10.216.253.134 with HTTP; Tue, 15 Feb 2011 00:13:42 -0800 (PST) In-Reply-To: <20110215010613.GH9732@digitalkingdom.org> References: <20110215010613.GH9732@digitalkingdom.org> Date: Tue, 15 Feb 2011 10:13:42 +0200 Message-ID: Subject: Re: [lojban] Character encoding fix for the Lojban wiki From: Veijo Vilva To: lojban@googlegroups.com X-Original-Sender: veijo.vilva@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of veijo.vilva@gmail.com designates 74.125.82.172 as permitted sender) smtp.mail=veijo.vilva@gmail.com; dkim=pass (test mode) header.i=@gmail.com Reply-To: lojban@googlegroups.com Precedence: list Mailing-list: list lojban@googlegroups.com; contact lojban+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: lojban@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: multipart/alternative; boundary=0016e65b54101d659c049c4dbeed --0016e65b54101d659c049c4dbeed Content-Type: text/plain; charset=ISO-8859-1 On Tue, Feb 15, 2011 at 3:06 AM, Robin Lee Powell < rlpowell@digitalkingdom.org> wrote: > On Mon, Feb 14, 2011 at 05:03:43PM +0200, Veijo Vilva wrote: > > I have fixed the character encoding problem which has affected the > > wiki user interface for the last several months. There are still > > some translations missing, and some translations in the original > > language files for the wiki are bad or even erroneous, but the > > encoding problems are gone. > > \o/ > > Thanks so much! > > Were any code changes needed? > I didn't do any, there was just too much unknown code and too little time. I prepared the Finnish home page partially in order to be able to experiment more freely and found out a brute force method to fix things, perhaps only temporarily as the underlying cause for the problem is still lurking somewhere. The earlier db contents seemed to be OK but were incorrectly encoded for the interface. My experiments with the Finnish version helped me to find a procedure which can be used to easily fix things if the problem resurfaces in the future. Re-importing the language.php file for a language fixes that language but destroys all the manually entered custom translations. However, if that language has a custom.php file, its contents are merged with the language.php file during the import to form a new base for the db, a new base without any translations tagged as new. At this point the wiki cache should be emptied. In case somebody manually enters any new translations, they can be exported and inserted into the custom.php file after which an import operation reinitializes the db with the new, merged contents and any new export shows only translations made after the merger. This way everything is in a known state, and the translation db (for all our languages) can be restored in a few minutes (or an hour or two if there are many custom files to be updated first.) My procedure to update a language, say Finnish, is as follows: 1. at wiki/Edit Languages export the new translations for Finnish 2. copy-paste the translations to a copy of the custom.php file on my home computer 3. on lojban.org: cp lang/fi/custom lang_vv/fi/custom.old (lang is linked to /var/www/lojban/tiki/lang ) 4. upload to vilva@www.lojban.org:lang_vv/fi 5. on lojban.org: sudo cp lang_vv/fi/custom.php lang/fi 6. at wiki/Edit Languages import Finnish 7. empty the wiki cache 8. check that I can access the Finnish home page 9. if the page doesn't display, there is a PHP coding error in the custom file, and the wiki is stuck: a. sudo rm lang/fi/custom.php to release the wiki b. sudo cp lang/fi/custom.old lang/fi/custom.php c. edit the file at home d. loop to 4 To restore all the languages when the custom files are up-to-date: 1. on wiki/Edit languages: import all the languages one by one, which takes about two minutes total 2. empty the cache There is an option to export a new language.php version from the db, but in our case it is better to keep a separate custom file so that we don't lose our custom translations during a system update. Veijo -- web site: http://galactinus.net/vilva/ -- You received this message because you are subscribed to the Google Groups "lojban" group. To post to this group, send email to lojban@googlegroups.com. To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/lojban?hl=en. --0016e65b54101d659c049c4dbeed Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Feb 15, 2011 at 3:06 AM, Robin Lee Powell <rlpowell@digit= alkingdom.org> wrote:
On Mon, Feb 14, 2011 at 05:03:43PM +0200,= Veijo Vilva wrote:
> I have fixed the character encoding problem which has affected the
> wiki user interface for the last several months. There are still
> some translations missing, and some translations in the original
> language files for the wiki are bad or even erroneous, but the
> encoding problems are gone.
=A0
=
\o/

Thanks so much!

Were any code changes needed?

I didn= 9;t do any, there was just too much unknown code and too little time. I pre= pared the Finnish home page partially in order to be able to experiment mor= e freely and found out a brute force method to fix things, perhaps only tem= porarily as the underlying cause for the problem is still lurking somewhere= . The earlier db contents seemed to be OK but were incorrectly encoded for = the interface. My experiments with the Finnish version helped me to find a = procedure which can be used to easily fix things if the problem resurfaces = in the future.

Re-importing the language.php file for a language fixes= that language but destroys all the manually entered custom translations. H= owever, if that language has a custom.php file, its contents are merged wit= h the language.php file during the import to form a new base for the db, a = new base without any translations tagged as new. At this point the wiki cac= he should be emptied. In case somebody manually enters any new translations= , they can be exported and inserted into the custom.php file after which an= import operation reinitializes the db with the new, merged contents and an= y new export shows only translations made after the merger. This way everyt= hing is in a known state, and the translation db (for all our languages) ca= n be restored in a few minutes (or an hour or two if there are many custom = files to be updated first.)=A0

My procedure to update a language, say Finnish, =A0is a= s follows:

=A0=A0 =A01. at wiki/Edit Languages exp= ort the new translations for Finnish
=A0=A0 =A02. copy-paste the = translations to a copy of the custom.php file on my home computer
=A0=A0 =A03. on lojban.org: =A0cp la= ng/fi/custom lang_vv/fi/custom.old =A0 =A0 =A0(lang is linked to /var/www/l= ojban/tiki/lang )
=A0=A0 =A04. upload to vilva@www.lojban.org:lan= g_vv/fi
=A0=A0 =A05. on lojban.org: =A0sudo cp la= ng_vv/fi/custom.php lang/fi
=A0=A0 =A06. at wiki/Edit Languages = =A0import Finnish
=A0=A0 =A07. empty the wiki cache
=A0= =A0 =A08. check that I can access the Finnish home page
=A0=A0 =A09. if the page doesn't display, there is a PHP coding er= ror in the custom file, and the wiki is stuck:
=A0=A0 =A0 =A0 =A0= a. sudo rm lang/fi/custom.php =A0 =A0to release the wiki
=A0=A0 = =A0 =A0 =A0b. sudo cp lang/fi/custom.old lang/fi/custom.php
=A0=A0 =A0 =A0 =A0c. edit the file at home
=A0=A0 =A0 =A0 = =A0d. loop to 4
=A0=A0
To restore all the languages whe= n the custom files are up-to-date:

=A0=A0 =A0 1. o= n wiki/Edit languages: import all the languages one by one, which takes abo= ut two minutes total=A0
=A0=A0 =A0 2. empty the cache
=A0
There is an opti= on to export a new language.php version from the db, but in our case it is = better to keep a separate custom file so that we don't lose our custom = translations during a system update.

=A0=A0 Veijo

--
You received this message because you are subscribed to the Google Groups "= lojban" group.
To post to this group, send email to lojban@googlegroups.com.
To unsubscribe from this group, send email to lojban+unsubscribe@googlegrou= ps.com.
For more options, visit this group at http://groups.google.com/group/lojban= ?hl=3Den.
--0016e65b54101d659c049c4dbeed--