Skip to content

Commit

Permalink
Added language support for columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 13, 2020
1 parent 6aabd0b commit 422b41e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
10 changes: 6 additions & 4 deletions Taskodrome/Taskodrome.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ public function menu()

public function config()
{
$status_list = explode(',', lang_get( 'status_enum_string' ));
foreach( $status_list as $key => $value ) {
$status_list[$key] = substr($value, strpos($value, ':') + 1);
}
$status_list = explode(',', config_get('status_enum_string') );

foreach( $status_list as $key => $value ) {
$status_list[$key] = explode(':', $value)[0];
}

return array(
"status_board_order_default" => $status_list,
"status_board_order" => $status_list,
Expand Down
6 changes: 3 additions & 3 deletions Taskodrome/pages/config_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

auth_reauthenticate();
access_ensure_global_level( config_get( 'manage_plugin_threshold' ) );

require_once( config_get( 'plugin_path' ) . 'Taskodrome/core/config_helper.php' );
layout_page_header( plugin_lang_get( 'config_title' ) );

layout_page_begin( 'manage_overview_page.php' );
Expand Down Expand Up @@ -42,14 +42,14 @@
</br>
<span class="small">
<?php printf( plugin_lang_get( 'default_value' ),
string_attribute( implode( ';', plugin_config_get( $t_field . '_default') ) ));
string_attribute( implode( ';', convertStatusEnumToString(plugin_config_get( $t_field . '_default') )) ));
?>
</span>
</th>
<td class="center" width="20%">
<span class="input">
<input name="<?php echo $t_field; ?>" size="75" type="text" value="<?php
$t_config = plugin_config_get( $t_field, null, false, null, helper_get_current_project() );
$t_config = convertStatusEnumToString(plugin_config_get( $t_field, null, false, null, helper_get_current_project()) );
$t_encoded = '';
foreach( $t_config as $t_value ) {
$t_encoded .= "$t_value;";
Expand Down
4 changes: 2 additions & 2 deletions Taskodrome/pages/main.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

html_robots_noindex();

require_once( config_get( 'plugin_path' ) . 'Taskodrome/core/config_helper.php' );
layout_page_header_begin(plugin_lang_get( 'board' ));

print "<link rel=\"stylesheet\" type=\"text/css\" href=\"".plugin_file('taskodrome.css')."\" />\n";
Expand Down Expand Up @@ -159,7 +159,7 @@ function write_bug_rows( $p_rows )
print '<p class="status_color_map" value="'.$status_color_map.'"></p>';

$status_order = null;
foreach( plugin_config_get("status_board_order", null, false, null, $current_project_id) as $t_value ) {
foreach( convertStatusEnumToString( plugin_config_get("status_board_order", null, false, null, $current_project_id)) as $t_value ) {
$status_order .= $t_value.';';
}

Expand Down

0 comments on commit 422b41e

Please sign in to comment.