Fork me on GitHub
Subscribe 3

Ticket #5 (fixed enhancement)

Localization of install page

  • Created: 2010-05-23 20:53:07
  • Reported by: Reines
  • Assigned to: Reines
  • Milestone: 1.4.3
  • Component: localization
  • Priority: low

Currently the installation script isn't localized.

History

Reines 2010-05-25 21:38:07

  • Milestone set to 1.4.1.

Reines 2010-06-25 23:26:27

  • Owner set to Reines.

I've started work on this so keep off!

Reines 2010-07-21 23:06:03

  • Milestone changed from 1.4.1 to 1.4.2.

Reines 2010-07-24 14:47:54

  • Milestone changed from 1.4.2 to 2.0-beta1.
  • Owner Reines removed.
  • Visibility set to private.

Actually I'm going to change this to future. Now 1.4 is out we shouldn't be doing enhancements like this really, especially if it breaks existing language packs like this would.

Franz 2010-07-24 14:50:05

Well, we could always use English as a fallback, no?
But I guess you're right. It's "only" the install page, after all.

Reines 2010-07-24 16:30:39

  • Visibility set to public.

I guess that would be an option.

PS. No idea why this was marked private, must have accidently pressed it.

adaur 2010-07-31 11:47:02

Reines, maybe I could help you to do this task?

Reines 2010-07-31 11:52:44

Sure, I'm not sure where the start I made has gone (I have about 4 different computers with fluxbb on them...), so if you wish to take this ticket feel free smile

adaur 2010-08-29 09:09:03

I sent a mail to Reines, but apparently he didn't receive it.

So here is what I told to him:

"As I said, I have localized install.php file.

Everything looks fine, except these four queries, I don't know what is the right synthax:

// Insert the four preset groups

        $db->query('INSERT INTO '.$db->prefix.'groups ('.($db_type != 'pgsql' ? 'g_id, ' : '').'g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood) VALUES('.($db_type != 'pgsql' ? '1, ' : '')."'Administrators', 'Administrator', 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0)") or error('Unable to add group', __FILE__, __LINE__, $db->error());


        $db->query('INSERT INTO '.$db->prefix.'groups ('.($db_type != 'pgsql' ? 'g_id, ' : '').'g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood) VALUES('.($db_type != 'pgsql' ? '2, ' : '').$lang_install['Moderators'].', '.$lang_install['Moderator']."', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0)") or error('Unable to add group', __FILE__, __LINE__, $db->error());


        $db->query('INSERT INTO '.$db->prefix.'groups ('.($db_type != 'pgsql' ? 'g_id, ' : '').'g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood) VALUES('.($db_type != 'pgsql' ? '3, ' : '').$lang_install['Guest']."', NULL, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 60, 30, 0)") or error('Unable to add group', __FILE__, __LINE__, $db->error());


        $db->query('INSERT INTO '.$db->prefix.'groups ('.($db_type != 'pgsql' ? 'g_id, ' : '').'g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood) VALUES('.($db_type != 'pgsql' ? '4, ' : '').$lang_install['Member']."', NULL, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 60, 30, 60)") or error('Unable to add group', __FILE__, __LINE__, $db->error());

"

Here are the files:

http://pastebin.com/kzwnSjjZ
&
http://pastebin.com/b2vRv6TT

Maybe the language's detection could be improved?

Reines 2010-08-29 10:33:28

Sorry, I did get it, just haven't had time to look over any of it yet.

Reines 2010-08-29 21:06:33

  • Milestone changed from 2.0-beta1 to 1.4.3.

Reines 2010-09-18 11:50:18

  • Owner set to Reines.

Reines 2010-09-18 12:35:38

I've now commit most of this, just need to come up with some way to allow the user to choose which language the script should use (I don't like snipping using HTTP_ACCEPT_LANGUAGE).

If I recall correctly, in 1.3 we defaulted to English though had a language select box at the very start of the page.

Franz 2010-09-18 12:54:13

Would that mean you have to go through the entire first page in English, whatever language you choose?

In that case, I'd suggest adding the select box on the very first page - the one that only contains the introduction text.

adaur 2010-09-18 19:29:53

I think using HTTP_ACCEPT_LANGUAGE and the select box could be a good choice: HTTP_ACCEPT_LANGUAGE selects the language automatically in the select box and the user confirms or corrects it.

Reines 2010-10-01 17:13:14

  • Description changed. (Diff)

Reines 2010-10-16 14:47:08

  • Status changed from open to fixed.

I've added a form to choose the language the install script should use on the page where the initial message redirecting to install.php is shown. We could possibly make an educated guess at the correct language there, but that would fall under ticket #153 so I'm closing this one for now.