Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap theme, missing translation #367

Open
portapipe opened this issue Aug 11, 2016 · 31 comments
Open

Bootstrap theme, missing translation #367

portapipe opened this issue Aug 11, 2016 · 31 comments

Comments

@portapipe
Copy link
Contributor

Hi.
I've just bought the bootstrap theme.
Awesome and warmly suggested!
BUT. On the top of each column, the search box, it's just "Search %name%" and is not localized.
I've posted that here because I really don't know where to write it.

@portapipe
Copy link
Contributor Author

oh and another thing (I don't know if it's just bootstrap or not):
IF you try to save an empty form with required fields, the error messages are not localized:

The Username field is required.
The Password field is required.

@portapipe
Copy link
Contributor Author

oh and when you click on an image in the bootstrap version the image is opened in a new window, and not with the beautiful fancy popover. Could you implement that?
Thanks 😄

@heruprambadi
Copy link

screenshot_1

I don't get it with popover thing that you've mentioned. Maybe your custom template doesn't work well with grocerycrud.

@portapipe
Copy link
Contributor Author

Oh great, I'll look into that. I thought it was a theme issue. Waiting for the other stuff :)

@scoumbourdis
Copy link
Owner

scoumbourdis commented Aug 11, 2016

@portapipe for your questions:

  1. Yes you are right there is a missing translation at "the search {column}". Possible release date: 12th of September
  2. The error messages can be localized by Codeigniter easily. For more read this: http://stackoverflow.com/questions/9070227/translating-codeigniters-form-validation-error-messages . Probably your language will be already translated by other people. A simple google search will help you. For example, for spanish language I did google "codegniter language spanish" and the first result was this: http://github.com/rasec/CodeIgniter-Spanish-Pack you can follow the same process to find yours
  3. There is not any issue with the fancybox as far as I can see. Please give me more information about your issue. Can you also check that the behaviour is different at the flexigrid theme?

Thanks
Johnny

@portapipe
Copy link
Contributor Author

Great, so quick fix for the first.
The second it's fine, now that I know that is a codeigniter problem I'll look for that. Thanks for the link.
The third I think it's an issue with the bootstrap template I'm using. I'll change that.
Thanks for all!

@portapipe
Copy link
Contributor Author

portapipe commented Aug 12, 2016

@scoumbourdis @heruprambadi Hi and thanks for your time.
I'm trying to make the bootstrap fancybox works BUT I've test the theme with the example.php file with the same issue: when I click on an uploaded image (just on the list page, not the edit or the single view one) it will be open on a new tab. (btw in the single view page I see a link, not the image; is that correct?)
I thought was a problem with my theme but the example.php is the most basic template I know, so...
Let me know 😃 Thanks

@heruprambadi
Copy link

What browser you using ? Is it up to date ?

@portapipe
Copy link
Contributor Author

@heruprambadi the very last Safari and it doesn't work just on the main table page. In the edit page it works, in the single item view page a link is shown, in the main table it open the image in a new tab.

@scoumbourdis
Copy link
Owner

Hello @heruprambadi ,

You are right. I was looking the edit page. It doesn't work on the grid. Something to consider for the next release. I will have it as a reminder so I can pick that up. I will let you know once this is done.

Cheers
Johnny

@heruprambadi
Copy link

Yeah.. i just know it. It just work on add/edit 😐

@portapipe
Copy link
Contributor Author

hem... so? There's something I can help with?

@portapipe
Copy link
Contributor Author

(another translation is missing, the "Loading" message when reloading data in a table, bootstrap theme)

@scoumbourdis
Copy link
Owner

Hello @portapipe . No help on that, you just need to wait really :)

A quick update so other people will also know:

  1. Probably a release on the 12th September version (there are scheduled releases) for that
  2. Not an issue
    3.Probably a release on the 12th September version (there are scheduled releases) for that

@scoumbourdis
Copy link
Owner

By the way @portapipe great page: https://portapipe.github.io/Login-GroceryCrud/ pretty easy to understand and with good examples 😃

@portapipe
Copy link
Contributor Author

@scoumbourdis oh thanks :) I think I'll create a complete per-table permission system with Read/Write/List/OnlyYourID system for user's groups just for GroceryCrud (with a table of checkboxes). I don't know how to do it right now but I'm trying to figure it out :)
It could help lots of people to create a complete per-user unique control panel.

@scoumbourdis
Copy link
Owner

Hey no problem.

@portapipe I want (I don't know if at the end I WILL I am too busy these days tbh) to create a video at my channel with theme "So you want to create an open-source project?" in order to help people create their own open-source projects and to see that it is actually just a decision really! I like your page because it is simple and have just enough examples for the user to understand. I wanted to mention your page as a very good example of how easy you can actually create an open-source project with a webpage and you don't have to pay a dollar for that! What do you think?

@portapipe
Copy link
Contributor Author

@scoumbourdis well why not, It seems a really good project 😄 It's ok for me.
I'm adding a GRID User Group Permission Management in the project and I'm adding some stuff to the github's wiki, if you're interested in that.
Oh I have to ask you some public methods. I've used like 10 hours to get the selected crud table name and it's a pain to create some add ons to GC 👅

@scoumbourdis
Copy link
Owner

no problem. Which methods do you like to be public?

@portapipe
Copy link
Contributor Author

Well, You can create a method to access every class variable for example, or let it public (not protected) and it should be ok.

@scoumbourdis
Copy link
Owner

scoumbourdis commented Aug 25, 2016

I did search the word protected and I have 212 matches :D I can't turn them all to public really. I would prefer to add more public get functions really. It is all about the autocomplete functionality for grocery CRUD. Do you mind to send me a list because really there are too many?

@scoumbourdis
Copy link
Owner

Is it ok to return those for start?
/* Callbacks */
protected $callback_before_insert = null;
protected $callback_after_insert = null;
protected $callback_insert = null;
protected $callback_before_update = null;
protected $callback_after_update = null;
protected $callback_update = null;
protected $callback_before_delete = null;
protected $callback_after_delete = null;
protected $callback_delete = null;
protected $callback_column = array();
protected $callback_add_field = array();
protected $callback_edit_field = array();
protected $callback_upload = null;
protected $callback_before_upload = null;
protected $callback_after_upload = null;

@scoumbourdis
Copy link
Owner

and probably those?

protected $unset_texteditor = array();
protected $unset_add = false;
protected $unset_edit = false;
protected $unset_delete = false;
protected $unset_read = false;
protected $unset_jquery = false;
protected $unset_jquery_ui = false;
protected $unset_bootstrap = false;
protected $unset_list = false;
protected $unset_export = false;
protected $unset_print = false;
protected $unset_back_to_list = false;
protected $unset_columns = null;
protected $unset_add_fields = null;
protected $unset_edit_fields = null;
protected $unset_read_fields = null;

@portapipe
Copy link
Contributor Author

I think that some variables are better to be public then methods, like:

protected $state_code = null;
protected $state_info = null;
protected $columns = null;

private $basic_db_table_checked = false;
private $columns_checked        = false;
private $add_fields_checked     = false;
private $edit_fields_checked    = false;
private $read_fields_checked    = false;

protected $default_theme        = 'flexigrid';
protected $language             = null;
protected $lang_strings         = array();
protected $php_date_format      = null;
protected $js_date_format       = null;
protected $ui_date_format       = null;
protected $character_limiter    = null;
protected $config               = null;

protected $add_fields           = null;
protected $edit_fields          = null;
protected $read_fields          = null;
protected $add_hidden_fields    = array();
protected $edit_hidden_fields   = array();
protected $field_types          = null;
protected $basic_db_table       = null;
protected $theme_config         = array();
protected $subject              = null;
protected $subject_plural       = null;
protected $display_as           = array();
protected $order_by             = null;
protected $where                = array();
protected $like                 = array();
protected $having               = array();
protected $or_having            = array();
protected $limit                = null;
protected $required_fields      = array();
protected $_unique_fields           = array();
protected $validation_rules     = array();
protected $relation             = array();
protected $relation_n_n         = array();
protected $upload_fields        = array();
protected $actions              = array();

protected $form_validation      = null;
protected $change_field_type    = null;
protected $primary_keys         = array();
protected $crud_url_path        = null;
protected $list_url_path        = null;

/* The unsetters */
protected $unset_texteditor     = array();
protected $unset_add            = false;
protected $unset_edit           = false;
protected $unset_delete         = false;
protected $unset_read           = false;
protected $unset_jquery         = false;
protected $unset_jquery_ui      = false;
protected $unset_bootstrap      = false;
protected $unset_list           = false;
protected $unset_export         = false;
protected $unset_print          = false;
protected $unset_back_to_list   = false;
protected $unset_columns        = null;
protected $unset_add_fields     = null;
protected $unset_edit_fields    = null;
protected $unset_read_fields    = null;

/* Callbacks */
protected $callback_before_insert   = null;
protected $callback_after_insert    = null;
protected $callback_insert          = null;
protected $callback_before_update   = null;
protected $callback_after_update    = null;
protected $callback_update          = null;
protected $callback_before_delete   = null;
protected $callback_after_delete    = null;
protected $callback_delete          = null;
protected $callback_column          = array();
protected $callback_add_field       = array();
protected $callback_edit_field      = array();
protected $callback_upload          = null;
protected $callback_before_upload   = null;
protected $callback_after_upload    = null;

protected $default_javascript_path              = null; //autogenerate, please do not modify
protected $default_css_path                     = null; //autogenerate, please do not modify
protected $default_texteditor_path              = null; //autogenerate, please do not modify
protected $default_theme_path                   = null; //autogenerate, please do not modify
protected $default_language_path                = 'assets/grocery_crud/languages';
protected $default_config_path                  = 'assets/grocery_crud/config';
protected $default_assets_path              

@portapipe
Copy link
Contributor Author

portapipe commented Aug 26, 2016

Oh I forgot to ask if there is a way to customize the "You don't have permissions for this operation" page, maybe with a template page, (here you explain how to make that BUT) if you add something like public $permission_deny_pages so we can use something like $crud->set_permisson_deny_pages(array("header.php","errorPerm.php","footer.php")) and make the check with the GC render function well... it will be great!

p.s. A redirect page should work as well too 👌

BTW I think we should chat live sometimes.

@scoumbourdis
Copy link
Owner

scoumbourdis commented Sep 12, 2016

Hello @portapipe and sorry for the delayed answer. It seems that everything that you are saying are making sense. However the time that I have is very little (I even didn't have enough time to write this). So basically, I need to write everything down and see what I can do first as a priority.

So with the latest release of grocery CRUD and bootstrap theme, now the Search %ColumnName% is translatable. My next task is to see the fancybox with the image on bootstrap theme. After that I will check all of your requests (e.g. CK editor... e.t.c.) to add a priority.

Thanks
Johnny

@portapipe
Copy link
Contributor Author

portapipe commented Sep 12, 2016

@scoumbourdis don't worry, I've thought that.
Take your time, the ckeditor need some particular attentions in my opinion, like make the users load files directly into the editor, embedding videos and stuff that any customer ask to us, the developers, every time in every projects (4 projects for 4 different customers, same tools questions and needs).
That's why I'm suggesting that, to update the panel based on every new (big and important) needs 😃
The fancybox works great in the single view, if this can help for some copy-paste code.
Good for the translation stuff. I've pulled a thing to make huge table faster to be shown (really very fast) and this should be a priority for huge projects (here)
The italian strings I've pulled are already added, so great. BTW the "Search" translation is "Cerca" in Italian.
Have a nice day!

@scoumbourdis
Copy link
Owner

scoumbourdis commented Sep 13, 2016

Yes, I had a quick look of the pull request and it is just that it doesn't consider the

 $crud->where()

see: http://www.grocerycrud.com/documentation/options_functions/where for more that has less totals. I think that a simple change:

$key = $this->get_primary_key();
$this->db->select($key);
return $this->db->get($this->table_name)->num_rows();

Would do the trick though. Do you have time to change it, test it and do a pull request again?

Thanks a lot
Johnny

@portapipe
Copy link
Contributor Author

@scoumbourdis here you go, done and pulled ;)

@sephinah
Copy link

hello i have the same problem with the GC bootstrap theme which the global search is not working...
here's my code.. please help.

public function add_students()
{
$crud = new grocery_CRUD();
$crud->set_theme('bootstrap');
$crud->set_subject('List of Students');
$crud->set_table('studentdb');

		$crud->columns('LRN','year_section','studentLastName','studentFirstName','studentMiddleName','phone','address','guardian','contactNo');
		$crud->display_as('studentLastName','Last Name')
			 ->display_as('studentFirstName','First Name')
			 ->display_as('studentMiddleName','Middle Name')
			 ->display_as('phone',"Tel. No. / Phone No.")
			 ->display_as('LRN',"Learner's Reference Number")
			 ->display_as('guardian',"Parent / Guardian")
			 ->display_as('contactNo',"Contact No. In Case of Emergency");



		**$crud->set_relation('year_section','section_list','{yearLevel} {year_section}');**

	
		$crud->field_type('lowest_rating','invisible');
		$crud->field_type('percentage_value','invisible');
		$crud->field_type('percentage_standard','invisible');
		 
		$crud->field_type('written_works','invisible');
		$crud->field_type('performance_task','invisible');
		$crud->field_type('quarter_exam','invisible');

	

		$crud->callback_before_insert(array($this,'get_average'));
		$crud->callback_before_update(array($this,'get_average'));

		$output = $crud->render();

		$this->_studentroll_output($output);
}

function get_average($post_array) {

$post_array['quarter_exam'] = 20;
$post_array['performance_task'] = 60;
$post_array['written_works'] = 20;
$post_array['lowest_rating'] = 60;
$post_array['percentage_standard'] = 100;
$post_array['percentage_value'] = ($post_array['percentage_standard'] - $post_array['lowest_rating']);

return $post_array;
}

nevermind the rest... of the code i am using $crud->set_relation('year_section','section_list','{yearLevel} {year_section}'); and in this column it is not working.. please help!

here are the screenshots.

image

@jasteele12
Copy link

Hey @sephinah

I think this should be posted as a different issue (it's not a missing translation). I also don't think it's a good idea(tm) or maybe even illegal to post 9th graders' personal information :-P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants