Skip to content

Commit 5803240

Browse files
Anthony Demurtasdregad
authored andcommitted
Rename "default_branch" to "default_master_branch" and improve labelling
Now indicates that "default_master_branch" is only for Git based repositories.
1 parent f17ee83 commit 5803240

File tree

10 files changed

+20
-20
lines changed

10 files changed

+20
-20
lines changed

Source/Source.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function config() {
8383
'bugfix_message' => 'Fix committed to $1 branch.',
8484
'bugfix_message_view_status' => VS_PUBLIC,
8585

86-
'default_branch' => 'master',
86+
'default_master_branch' => 'master',
8787

8888
'remote_checkin' => OFF,
8989
'checkin_urls' => serialize( array( 'localhost' ) ),

Source/lang/strings_english.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ $s_plugin_Source_bugfix_message = 'Bug Fixed Message Template';
100100
$s_plugin_Source_bugfix_message_info = 'Use $1 for branch, $2 for revision, $3 for timestamp, $4 for commit message, $5 for repository name, or $6 for changeset ID.';
101101
$s_plugin_Source_bugfix_message_view_status = 'Bug Fixed Message View State';
102102
$s_plugin_Source_bugfix_message_view_status_info = 'Note: if the changeset\'s author/committer does not have <em>private_bugnote_threshold</em>, the note will be Public regardless of this setting.';
103-
$s_plugin_Source_default_branch = 'Default branch';
104-
$s_plugin_Source_default_branch_info = 'Branch by default when creating a repository.';
103+
$s_plugin_Source_default_master_branch = 'Default primary branches';
104+
$s_plugin_Source_default_master_branch_info = 'Only for Git-based repositories. Branches by default when creating a repository (comma-separated list or *).';
105105
$s_plugin_Source_reset = 'Reset to default';
106106
$s_plugin_Source_menu_links = 'Main Menu Links';
107107
$s_plugin_Source_show_repo_link = 'Repositories';

Source/lang/strings_french.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ $s_plugin_Source_bugfix_message = 'Modèle de message de résolution';
9898
$s_plugin_Source_bugfix_message_info = 'Utilisez $1 pour la branche, $2 pour la révision, $3 pour l\'horodatage, $4 pour le message de soumission, ou $5 pour le nom du dépôt.';
9999
$s_plugin_Source_bugfix_message_view_status = 'Type de message de résolution';
100100
$s_plugin_Source_bugfix_message_view_status_info = 'Note: si l\'auteur du jeu de changement n\'a pas le niveau <em>private_bugnote_threshold</em>, la note sera Publique quel que soit la valeur de cette option.';
101-
$s_plugin_Source_default_branch = 'Branche par défaut';
102-
$s_plugin_Source_default_branch_info = 'Branche par defaut lors de la création d\'un dépôt.';
101+
$s_plugin_Source_default_master_branch = 'Branche par défaut';
102+
$s_plugin_Source_default_master_branch_info = 'Pour les dépôts basés sur Git uniquement. Branches renseignées par defaut lors de la création d\'un dépôt (liste avec séparateur virgule ou *).';
103103
$s_plugin_Source_reset = 'Réinitialiser';
104104
$s_plugin_Source_menu_links = 'Liens du menu principal';
105105
$s_plugin_Source_show_repo_link = 'Dépôts';

Source/pages/manage_config_page.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@
260260

261261
<tr class="spacer"></tr>
262262
<tr>
263-
<td class="category"><?php echo plugin_lang_get( 'default_branch' ) ?></td>
263+
<td class="category"><?php echo plugin_lang_get( 'default_master_branch' ) ?></td>
264264
<td>
265-
<input name="default_branch" type="text" class="input-sm" size="50" value="<?php echo string_attribute( plugin_config_get( 'default_branch' ) ) ?>"/>
265+
<input name="default_master_branch" type="text" class="input-sm" size="50" value="<?php echo string_attribute( plugin_config_get( 'default_master_branch' ) ) ?>"/>
266266
<br>
267-
<span class="small"><?php echo plugin_lang_get( 'default_branch_info' ) ?></span>
267+
<span class="small"><?php echo plugin_lang_get( 'default_master_branch_info' ) ?></span>
268268
</td>
269269
</tr>
270270

SourceBitBucket/SourceBitBucket.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function update_repo_form( $p_repo ) {
111111
if( isset($p_repo->info['master_branch']) ) {
112112
$t_master_branch = $p_repo->info['master_branch'];
113113
} else {
114-
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
114+
$t_master_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
115115
}
116116
?>
117117
<tr>
@@ -223,7 +223,7 @@ public function import_full( $p_repo, $p_use_cache = true ) {
223223
$t_branch = $p_repo->info['master_branch'];
224224

225225
if( is_blank( $t_branch ) ) {
226-
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
226+
$t_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
227227
}
228228

229229
$t_username = $p_repo->info['bit_username'];

SourceCgit/SourceCgit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function update_repo_form( $p_repo ) {
9393
if ( isset( $p_repo->info['master_branch'] ) ) {
9494
$t_master_branch = $p_repo->info['master_branch'];
9595
} else {
96-
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
96+
$t_master_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
9797
}
9898
?>
9999
<tr>
@@ -157,7 +157,7 @@ public function import_full( $p_repo ) {
157157

158158
$t_branch = $p_repo->info['master_branch'];
159159
if ( is_blank( $t_branch ) ) {
160-
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
160+
$t_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
161161
}
162162

163163
$t_branches = array_map( 'trim', explode( ',', $t_branch ) );

SourceGithub/SourceGithub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public function update_repo_form( $p_repo ) {
288288
if ( isset( $p_repo->info['master_branch'] ) ) {
289289
$t_master_branch = $p_repo->info['master_branch'];
290290
} else {
291-
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
291+
$t_master_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
292292
}
293293
?>
294294

@@ -572,7 +572,7 @@ public function import_full( $p_repo ) {
572572

573573
$t_branch = $p_repo->info['master_branch'];
574574
if ( is_blank( $t_branch ) ) {
575-
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
575+
$t_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
576576
}
577577

578578
if ($t_branch != '*')

SourceGitlab/SourceGitlab.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function update_repo_form( $p_repo ) {
115115
if ( isset( $p_repo->info['master_branch'] ) ) {
116116
$t_master_branch = $p_repo->info['master_branch'];
117117
} else {
118-
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
118+
$t_master_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
119119
}
120120
?>
121121
<tr>
@@ -249,7 +249,7 @@ public function import_full( $p_repo ) {
249249

250250
$t_branch = $p_repo->info['master_branch'];
251251
if ( is_blank( $t_branch ) ) {
252-
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
252+
$t_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
253253
}
254254

255255
# if we're not allowed everything, populate an array of what we are allowed

SourceGitphp/SourceGitphp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function update_repo_form( $p_repo ) {
8484
if ( isset( $p_repo->info['master_branch'] ) ) {
8585
$t_master_branch = $p_repo->info['master_branch'];
8686
} else {
87-
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
87+
$t_master_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
8888
}
8989
?>
9090
<tr>
@@ -152,7 +152,7 @@ public function import_full( $p_repo ) {
152152
echo '<pre>';
153153
$t_branch = $p_repo->info['master_branch'];
154154
if ( is_blank( $t_branch ) ) {
155-
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
155+
$t_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
156156
}
157157

158158
if ($t_branch != '*')

SourceGitweb/SourceGitweb.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function update_repo_form( $p_repo ) {
104104
if ( isset( $p_repo->info['master_branch'] ) ) {
105105
$t_master_branch = $p_repo->info['master_branch'];
106106
} else {
107-
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
107+
$t_master_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
108108
}
109109
?>
110110
<tr>
@@ -189,7 +189,7 @@ public function import_full( $p_repo ) {
189189

190190
$t_branch = $p_repo->info['master_branch'];
191191
if ( is_blank( $t_branch ) ) {
192-
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
192+
$t_branch = config_get( 'plugin_Source_default_master_branch', 'master' );
193193
}
194194

195195
if ($t_branch != '*')

0 commit comments

Comments
 (0)