SutharsanCreditAttribution: Sutharsan as a volunteer commented
Thanks for working on this. Have you use code sniffer to check the style?
+++ b/l10n_update.module
@@ -109,11 +109,13 @@ function l10n_update_help($path, $arg) {
- break;
+
+ break;
case 'admin/config/regional/language/update':
Is this according to coding standards? I doubt it.
+++ b/l10n_update.module
@@ -183,7 +185,7 @@ function l10n_update_menu_alter(&$menu) {
- * Check one project/language at a time, download and import if update available
+ * Check one project/language at a time, download and import if update available.
80+ chars
+++ b/l10n_update.module
@@ -291,10 +293,12 @@ function l10n_update_form_alter(&$form, $form_state, $form_id) {
break;
+
case 'locale_languages_predefined_form':
Agree, with the change. Previous case/break not consistent with this one.
+++ b/l10n_update.module
@@ -416,11 +418,23 @@ function l10n_update_client_save_string() {
- $lid = db_query("SELECT lid FROM {locales_source} WHERE source = :source AND context = :context AND textgroup = :textgroup", array(':source' => $_POST['source'], ':context' => '', ':textgroup' => $_POST['textgroup']))->fetchField();
+ $lid = db_query("SELECT lid FROM {locales_source} WHERE source =
+ :source AND context = :context AND textgroup = :textgroup",
+ array(
+ ':source' => $_POST['source'],
+ ':context' => '',
+ ':textgroup' =>
+ $_POST['textgroup'],
+ ))->fetchField();
I don't like these line breaks, it does not support readability of the code.
+++ b/l10n_update.module
@@ -447,7 +461,17 @@ function l10n_update_client_save_string() {
+ t('You could share your work with !l10n_server ¶
+ if you set your API key at !user_link.',
+ array(
It is bad for translators to break-up t() string.
Keep 'message' and 'level' at the same indention level, they are both arguments of the theme function.
+++ b/l10n_update.module
@@ -492,7 +516,8 @@ function l10n_update_system_update(array $components) {
- // Get translation status of the projects, download and update translations.
+ // Get translation status of the projects,
+ // download and update translations.
$options = _l10n_update_default_update_options();
Fill out the first line to a max, i.e. new line before "translations.".
+++ b/l10n_update.module
@@ -519,7 +544,8 @@ function l10n_update_system_remove($components) {
- // deleted. Not each disabled module will remove a project. E.g. sub modules.
+ // deleted. Not each disabled module will remove a project.
+ // E.g. sub modules.
$projects = array_keys(l10n_update_get_projects());
This patch contains #4 and many more code style errors and warnings (I used Code Sniffer, see Coder module 8.x branch). I skipped the code style errors that change the code, such as long arrays, camel case and underscore in variable names.
Comments
Comment #2
monika.kadam1206 CreditAttribution: monika.kadam1206 as a volunteer and at Faichi Solutions Pvt Ltd commentedI have resolved the 16 drupal coding standards issues for the module.
Comment #3
monika.kadam1206 CreditAttribution: monika.kadam1206 as a volunteer and at Faichi Solutions Pvt Ltd commentedComment #4
monika.kadam1206 CreditAttribution: monika.kadam1206 as a volunteer and at Faichi Solutions Pvt Ltd commentedUpdated the patch for more Errors and warnings.
Comment #5
monika.kadam1206 CreditAttribution: monika.kadam1206 as a volunteer and at Faichi Solutions Pvt Ltd commentedComment #6
Sutharsan CreditAttribution: Sutharsan as a volunteer commentedThanks for working on this. Have you use code sniffer to check the style?
Is this according to coding standards? I doubt it.
80+ chars
Agree, with the change. Previous case/break not consistent with this one.
I don't like these line breaks, it does not support readability of the code.
reformat 'updates', and 'deletes'.
It is bad for translators to break-up t() string.
Keep 'message' and 'level' at the same indention level, they are both arguments of the theme function.
Fill out the first line to a max, i.e. new line before "translations.".
See above.
Comment #7
Sutharsan CreditAttribution: Sutharsan as a volunteer commentedComment #8
Sutharsan CreditAttribution: Sutharsan as a volunteer commentedThis patch contains #4 and many more code style errors and warnings (I used Code Sniffer, see Coder module 8.x branch). I skipped the code style errors that change the code, such as long arrays, camel case and underscore in variable names.
Comment #10
Sutharsan CreditAttribution: Sutharsan as a volunteer commentedBefore I allow code changing style fixes, the test scripts of Localization Update must be activated first.
Comment #11
monika.kadam1206 CreditAttribution: monika.kadam1206 as a volunteer and at Faichi Solutions Pvt Ltd commentedYes I used code snipper to test drupal coding standards.
Still there where many errors 16 + errors so I corrected them leaving some array errors etc.