Author Topic: Problem with HADesigner and DB  (Read 3199 times)

massabuntu

  • Veteran
  • ***
  • Posts: 97
    • View Profile
Problem with HADesigner and DB
« on: June 26, 2009, 10:34:14 am »
Hi all,
i'm having some problem with HADesigner, i added another text_ls table in pluto_main database wich contains italian translation, when i added it there was already the origninal text_ls table, and it was added as text_LS_AltVersions by mysql(i think).
So i renamed the "old" one as Text_LS_BAK and the new one Text_LS.
 Now when i start HADesinger it returns a error like "Text_LS_AltVersion" is missing but i did'nt understand where   it pick the "AltVersion" since i started Hadesigner after the rename thing.

Obviously i did'nt make a DB Backup, am i screwed??

Thanks, Martino.

chriss

  • Veteran
  • ***
  • Posts: 140
    • View Profile
Re: Problem with HADesigner and DB
« Reply #1 on: June 26, 2009, 10:55:18 am »
Hi Martino

Obviously i did'nt make a DB Backup, am i screwed??

you could try to make an sqlCVS update and see if the correct table contents are pulled from the server.

My fresh install contained both mentioned tables Text_LS and Text_LS_AltVersions, however I don't know the purpose of the second one. Anyway, don't mess with tables by simply renaming/deleting them or the contents.

To insert a new translation you have to do the following two steps
1) add a new row with a new language to pluto_main.Language and remember the id (PK_Language) of the language. DO NOT OVERWRITE ANY EXISTING ROWS!
2) To translate the UI you have to add a new row to pluto_main.Text_LS for every row you would like to translate from pluto_main.Text, i.e., pick a row, translate it to italian and write your translation to the field Description in Text_LS. FK_Text has to be the same value as Text.PK_Text of the translated item and Text_LS.FK_Language has to be the same as Language.PK_Language. Note that you don't have to translate every field - if there is no match in Text_LS the UI falls back to the english text (fine for on-screen keyboard and stuff)

You need to understand what's happening here. We have a table the defines all available languages (pluto_main.Language). We also have a table with several texts for the UI (pluto_main.Text). Finally there is a table defining language specific texts/translation (pluto_main.Text_LS) in an overlay form. This last table is connected via foreign keys to pluto_main.Text (pluto_main.Text_LS.FK_Text -> pluto_main.Text.PK_Text) and pluto_main.Language (pluto_main.Text_LS.FK_Language -> pluto_main.Language.PK_Language). If you do not have these connections it won't work.

br,
/chriss

massabuntu

  • Veteran
  • ***
  • Posts: 97
    • View Profile
Re: Problem with HADesigner and DB
« Reply #2 on: June 26, 2009, 11:20:52 am »
I try an sqlCVS update and let see what we get...