Sahana Deployment Technical Issues

Discussion of technical issues as they emerge during the Sahana deployment.

Re: Help with Language Translation

Hi Luki,

> From my observation there are 3 Language supported by sahana.
> There are: Sinhala, Chinese and English.
> But why when I choose those three options from top menu of sahana, I see
> no differences?
> The language is still English.
> How can I make this happen?
> When I choose Chinese why can't i see Chinese language?

** <SRD> = SAHANA ROOT DIRECTORY (e.g: /var/www/sahana)

To the translations to work you have to have gettext support on php.
Please
check if you have gettext extension installed. Then if you want to see
the
Chinese translations,

- goto Administration->Set Locale and set the locale to chinese
- then go to Language Translation->Click on 'Compile Messages'
(Pls make sure that <SRD>/res/locale and all the
subdirectories are writable.)
- After this you would be able to see the translated strings in Chinese.
(The strings that are not translated would be shown in English)

> If I know how to this, hopefully i can translate the text from English
> to Indonesia.
>
> Correct me if I’m wrong.
>
> I see that you using converter from text to decimal for translation?
> Is that right?
> For example "Hello World" will converted to
> " Hello World "
> But when I paste this decimal to sahana.po file why my conversion is
> changed back to text?
> And still Sahana show no change with the translation.

This happens because those translations saved without using utf-8
encoding. Because of this always save the .po file in utf-8 format.

Open up the sahana.po file using a text editor and add the translation
to it.
Translation example:

The translation is done by entering the translated string for the
‘msgid’ string in the ‘msgstr’.

#: ../inc/lib_security/acl_action_form.inc:50
#: ../inc/lib_security/acl_action_form.inc:145
msgid "* Description:"
msgstr "* විස්තර:"

** this is a translation example for the string "* Description:" in to
Sinhala which is "* විස්තර:".

after that you can check if it works by copying it(sahana.po) to Chinese
(or even English)
locale directory '<SRD>/res/locale/zh_TW/LC_MESSAGES/'

After that you have to compile the the messages, using the 'Compile
Messages' button on the
'Language Translations' page.

Now instead of the getting Chinese translations, you will get your own
translated text.

**One thing you have to remember in to use a utf-8 enabled text editor
(e.g: gedit)
to enter the translated test to the sahana.po file.

Btw pls send the sahana.po file after translation so we can add
Indonesian language
to the next Sahana release.

Hope this helped..


Sudheera.

Help with Language Translation

Hi Fernando,

Thank you for your help.
I’ve receive the sahana.po file that you attach to me.
I want to learn more about sahana because sahana hopefully can be
deployed in Indonesia
From my observation there are 3 Language supported by sahana.
There are: Sinhala, Chinese and English.
But why when I choose those three options from top menu of sahana, I see
no differences?
The language is still English.
How can I make this happen?
When I choose Chinese why can't i see Chinese language?

If I know how to this, hopefully i can translate the text from English
to Indonesia.

Correct me if I’m wrong.

I see that you using converter from text to decimal for translation?
Is that right?
For example "Hello World" will converted to
" Hello World "
But when I paste this decimal to sahana.po file why my conversion is
changed back to text?
And still Sahana show no change with the translation.

I've try with:
"Content-Type: text/plain; charset=CHARSET\n"
And
"Content-Type: text/plain; charset=UTF-8n"

Both give me the same result

Please, can you give me a hint?

Thank You,



Lusiano,
Office Manager and Project Coordinator
Urremote.com

Re: Fwd: Problem when inserting many location data to Sahana

On Mon, 19 Jun 2006 05:37:35 -0400 (EDT), ravindra@opensource.lk said:
> > First, i'm a litte confuse how to do this (add country). Finally I had
> > figured this out.
> I went to http://www.urremote.com/sahana/www/index.php and saw why you
> are
> confused.
> I was explaining with regard to the latest Sahana release and saw
> that some of the features i explained are not there as its and old
> release
> you are using.
> sorry about the confusion.
>
> > http://www.urremote.com/sahana/www/index.php?mod=cr&act=acmp
> >
> > We add data to the database by this method:
> > 1. Open phpmyadmin
> > 2. Select sahana for database name
> > 3. Open location table and insert new data:
> you dont need to ,there is a web interface.
> >
> > I added some comment in case my interpretation is wrong
> you are right in all cases.
> >
> > location_id : 1
> > // This is increment and duplicate id is not allowed
> This is auto increment in your version , in the latest release its
> a universal unique ID.
> >
> > parent_id : 0
> > // 0 is for country. parent_id is used as a reference. For example, if
> > this data is province, Let's call this province "New York" and
> > location_id for "USA" is 25, then i put 25 for parent_id for "New York"
> you are 100% correct. But now parent_id NULL is used instead of 0
> >
> > search_id : 1
> > // search_id is also has the same value as location id, except for
> > Province, District, and Village. For province I add "samenumber to
> > location_id".1 so the value is 25.1. for District 25.1.1 and for Village
> > 25.1.1.1
> yes you are right ,this is an efficient way to find the hierarchy.
> But in the latest version , had to abondon the search id due to
> synchronization issues.
> >
> > opt_location_type : 1
> > // It has four option for Country: 1 Province: 2 District: 3 and
> > Village: 4
> yes ,this is where you specify what levels you want.
> In the latest release there is a web interface where you can add & remove
> levels (as i explained in my earlier mail)
> >
> > name: Ascension Island
> > // Name
> >
> > iso_code : ac
> > // ISO CODE
> not used right now ,but hope to
> >
> > description : Ascension Island
> > // Some description
> >
> > Based on this information, we manually insert all the Country and
> > Village Data to the database. Everything is work great. Country,
> > Province, District and Village is looking fine. But I see problem when I
> > select:
> from the very first release you can add and remove locations.
> so actually there is no need to insert manually.
> >
> > (http://www.urremote.com/sahana/www/index.php?mod=cr&act=acmp)
> >
> > 1. Country: Indonesia
> > 2. Province: Jawa Tengah
> > 3. District: Boyolali
> > --- Village: 260 Villages had added ---
> > Everything is look great
> >
> > But, when I try change to another Country or another District why some
> > part of province and village is still shown?
> >
> > I have try using the web interface for adding Country and Province, but
> > this problem is still the same.
> >
> > Please, can you help us by providing solution how to fix this? I've also
> > attach the SQL file in sql.gz format in case you want to see my whole
> > database.
> thanks for sending the data,otherwise i cant find the issue.
> the error may be through manual inserts which has resulted in the same
> search id for many locations. Old releases use the search id for various
> algortihms and it is used to quickly generate a tree of locations. The
> error is due to the dependency on the search id generation and fails
> with
> manual inserts as the search id may not be generated properly.
> But in the latest release this dependancy has been removed due to
> synchronization issue and because its not right.
> I have pasted some of those inserts.
>
> INSERT INTO `location` VALUES (254, 251, '101.1.1', '3', 'Boyolali',
> 'Boyolali', 'Boyolali');
> INSERT INTO `location` VALUES (255, 252, '101.1.1', '3', 'Bantul',
> 'Bantul', 'Bantul');
> INSERT INTO `location` VALUES (256, 251, '101.1.1', '3', 'MAGELANG',
> 'MAGELANG', 'MAGELANG');
> INSERT INTO `location` VALUES (257, 251, '101.1.1', '3', 'KLATEN',
> 'KLATEN', 'KLATEN');
> INSERT INTO `location` VALUES (258, 252, '101.1.1', '3', 'Sleman',
> 'Sleman', 'Sleman');
> INSERT INTO `location` VALUES (259, 252, '101.1.1', '3', 'Yogyakarta',
> 'Yogyakarta', 'Yogyakarta');
> INSERT INTO `location` VALUES (260, 252, '101.1.1', '3', 'Kulonprogo',
> 'Kulonprogo', 'Kulonprogo');
> INSERT INTO `location` VALUES (261, 252, '101.1.1', '3', 'Gunungkidul',
> 'Gunungkidul', 'Gunungkidul');
> INSERT INTO `location` VALUES (262, 254, '101.1.1.1', '4', 'BANYUANYAR',
> 'BANYUANYAR', 'BANYUANYAR');
> INSERT INTO `location` VALUES (263, 254, '101.1.1.1', '4', 'CANDI',
> 'CANDI', 'CANDI');
> INSERT INTO `location` VALUES (264, 254, '101.1.1.1', '4', 'CANDISARI',
> 'CANDISARI', 'CANDISARI');
> INSERT INTO `location` VALUES (265, 254, '101.1.1.1', '4', 'GLADAGSARI',
> 'GLADAGSARI', 'GLADAGSARI');
> INSERT INTO `location` VALUES (266, 254, '101.1.1.1', '4', 'GONDANG
> SLAMET', 'GONDANG SLAMET', 'GONDANG SLAMET');
> INSERT INTO `location` VALUES (267, 254, '101.1.1.1', '4', 'JLAREM',
> 'JLAREM', 'JLAREM');
> INSERT INTO `location` VALUES (268, 254, '101.1.1.1', '4', 'KALIGENTONG',
> 'KALIGENTONG', 'KALIGENTONG');
> INSERT INTO `location` VALUES (269, 254, '101.1.1.1', '4', 'KEMBANG',
> 'KEMBANG', 'KEMBANG');
>
>
> Hope this helps. you are doing a great job there and we are happy to help
> you. And you have done a great bit work of to understand the system and
> you have understood correctly.
> I am sure we can help with ease and fast as you are very quick to
> catchup.
> please do not hesitate to ask us for help.
>
> and after your work we would appreciate if you can share your location
> data,
> so we can ship them with sahana.
>
> all the best
>
> best regards
>
> ravindra
>

Re: Problem when inserting many location data to Sahana

On Mon, 19 Jun 2006 11:44:58 +0530, "Pradeeper"
<pradeeper@opensource.lk> said:
> Hi Luki
>
> I forwarded this to relevant developers who can help you on this. And
> they
> will contact you on this ASAP.
>
> I strongly encourage you to join our "Sahana-maindev" mailinglist where
> all
> the developers are communicating with each others. This is the best place
> to
> get help from developers. So please do join,
>
> https://lists.sourceforge.net/lists/listinfo/sahana-maindev
>
> If you need further help or have any concern, don't hesitate to contact
> me.
>
> Regards!
>
> Pradeeper
>
>
> On Monday 19 June 2006 11:00, Luki Lusiano wrote:
> > Hi Pradeeper,
> >
> > Thank You, your email and Ravindra's had helped me a lot.
> > First, i'm a litte confuse how to do this (add country). Finally I had
> > figured this out.
> > Right now we are deploying Sahana to Earthquake at Indonesia at this URL
> > http://urremote.com/index.php?title=Sahana_Jogja
> > Indonesia consists of so many Villages, and all Villages in the
> > Earthquake area are affected.
> > We want to add the entire Village to the database.
> > Right now we have added many villages to the database, as you can see in
> > this URL:
> >
> > http://www.urremote.com/sahana/www/index.php?mod=cr&act=acmp
> >
> > We add data to the database by this method:
> > 1. Open phpmyadmin
> > 2. Select sahana for database name
> > 3. Open location table and insert new data:
> >
> > I added some comment in case my interpretation is wrong
> >
> > location_id : 1
> > // This is increment and duplicate id is not allowed
> >
> > parent_id : 0
> > // 0 is for country. parent_id is used as a reference. For example, if
> > this data is province, Let's call this province "New York" and
> > location_id for "USA" is 25, then i put 25 for parent_id for "New York"
> >
> > search_id : 1
> > // search_id is also has the same value as location id, except for
> > Province, District, and Village. For province I add "samenumber to
> > location_id".1 so the value is 25.1. for District 25.1.1 and for Village
> > 25.1.1.1
> >
> > opt_location_type : 1
> > // It has four option for Country: 1 Province: 2 District: 3 and
> > Village: 4
> >
> > name: Ascension Island
> > // Name
> >
> > iso_code : ac
> > // ISO CODE
> >
> > description : Ascension Island
> > // Some description
> >
> > Based on this information, we manually insert all the Country and
> > Village Data to the database. Everything is work great. Country,
> > Province, District and Village is looking fine. But I see problem when I
> > select:
> >
> > (http://www.urremote.com/sahana/www/index.php?mod=cr&act=acmp)
> >
> > 1. Country: Indonesia
> > 2. Province: Jawa Tengah
> > 3. District: Boyolali
> > --- Village: 260 Villages had added ---
> > Everything is look great
> >
> > But, when I try change to another Country or another District why some
> > part of province and village is still shown?
> >
> > I have try using the web interface for adding Country and Province, but
> > this problem is still the same.
> >
> > Please, can you help us by providing solution how to fix this? I've also
> > attach the SQL file in sql.gz format in case you want to see my whole
> > database.
> >
> > Thank You,
> >
> >
> >
> > Lusiano,
> > Office Manager and Project Coordinator
> > Urremote.com
>
> --
> Debian GNU/Linux 'Etch' kernel 2.6.14.1
>
> This sentence contradicts itself -- no actually it doesn't.
> -- Douglas Hofstadter
>

Comments