Translate Terms is a module that provides an easy & quick way to translate vocabulary terms.

  • Translate Terms
  • Git: git clone --branch 7.x-1.x git.drupal.org:sandbox/SeyVaneerdewegh/1506226.git translate_terms
  • Drupal 7 project

Reviews I have done

Comments

patrickd’s picture

Welcome!

I see you've already started fixing the codestyle issues found by drupalcs, great!

Please take a moment to make your README.txt follow the guidelines for in-project documentation.

We do really need more hands in the application queue and highly recommend to get a review bonus so we will(/can) come back to your application sooner.

regards

seyv’s picture

Thank you for you response.

I have taken a second look at my README.txt and the guidelines you linked. According to me it follows these guidelines. Could you tell me where I made a mistake ?

Thanks in advance!

targoo’s picture

Status: Needs review » Needs work

Hi

Your README need to give more info on how to use your module. You can maybe repeat the synopsis of your project page on Drupal.org. The project page on Drupal.org should also contain a direct link to the README.txt.

We also really need more hands in the application queue. So please consider to get a review bonus so we will come back to your application sooner.

See also http://drupal.org/node/1011698
See also #1410826: [META] Review bonus

By the way I will not use 'und' but LANGUAGE_NONE instead...

patrickd’s picture

Status: Needs work » Needs review

Yes usage and installation instructions would be nice

(I don't think this is so critical for needs work)

seyv’s picture

Thank you for your time to comment on my application.

But I want to ask if you have read the README.txt? There is a synopsis available where the usage of this module is explained. There are practically no install instructions needed, when you have the required Internationalization module installed, this should blend right in.
Though I will mention it explicitly, thanks for the tip!

targoo’s picture

no but LANGUAGE_NONE could be.

but fine by me if applications can stay 'need review' even if we spot something wrong...

seyv’s picture

I will change this as soon as possible, so it can stay on need review. Thanks for you input!

EDIT: changed to LANGUAGE_NONE ;)

seyv’s picture

Issue tags: +PAreview: review bonus

Added 'PAReview: review bonus' tag

klausi’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: review bonus +PAreview: security

manual review:

  • "'access arguments' => array('administer translate terms'),": where does that permission come from? Is this provided by i18n or did you forget to implement hook_permission()?
  • "$languages = array(LANGUAGE_NONE => 'Undefined');": all user facing text must run through t() for translation. Also elsewhere.
  • "// For each vocabulary.": Comment is a bit too short, for each vocabulary you are doing what?
  • "if (module_exists('locale')) {": that check does not make sense, as the dependency chain of your module always requires that "locale" is enabled.
  • 'admin/translate_terms': do you think this is a good menu location? I first searched in admin/structure/taxonomy but did not find anything there.
  • Your module is XSS vulnerable. If I enter a term with the name <script>alert('XSS');</script> and go to admin/translate_terms I get a nasty javascript popup. Make sure to read http://drupal.org/node/28984 again.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

seyv’s picture

Status: Needs work » Needs review
  • I have changed the access arguments so it will use i18n_taxonomy permissions.
  • I added t() to all user facing text.
  • Removed the 'if (module_exists('locale')) {' check.
  • Changed the menu location to 'admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/translate_terms': this results in a extra tab for each taxonomy so you can translate terms per taxonomy
  • Implemented check_plain() for each inputfield.

thanks for your input klausi!

targoo’s picture

Hi

The rule is to store exactly what the user typed but make sure it is secure when it is displayed.

So to prevent XSS you need to perform the conversion when content is output, not when saved into the database ;-)

Please check http://drupal.org/node/28984

Try to get another review bonus to speed up the process.

Cheers,

seyv’s picture

ok, moved the check_plain() from input to output.

seyv’s picture

Issue summary: View changes

Added 'Reviews I have done'

seyv’s picture

Issue tags: +PAreview: review bonus

Added 'PAReview: review bonus' tag

klausi’s picture

Assigned: Unassigned » tim.plunkett
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Review of the 7.x-1.x branch:

  • Drupal Code Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: ...-7/sites/all/modules/pareview_temp/test_candidate/translateterms.module
    --------------------------------------------------------------------------------
    FOUND 3 ERROR(S) AFFECTING 3 LINE(S)
    --------------------------------------------------------------------------------
     12 | ERROR | Do not use t() in hook_menu()
     13 | ERROR | Do not use t() in hook_menu()
     40 | ERROR | Expected 1 space between the closing parenthesis and the opening
        |       | brace; found 0
    --------------------------------------------------------------------------------
    

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.

manual review:
"translateterms_textbox_combo($term->tid, $globallang, check_plain($term->name))": instead of doing the check_plain in the function call you should do it as late as possible to the output, i.e directly in translateterms_textbox_combo(). And as the form API sanitizes #default_value automatically you are now doing double escaping, which is bad.

But that are just minor issues, otherwise I would say this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects. Assigning to tim.plunkett as he might have time to finally approve this.

sreynen’s picture

Assigned: tim.plunkett » Unassigned
Status: Reviewed & tested by the community » Fixed

Hi SeyVaneerdewegh,

Thanks for your contribution and welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects, at your discretion.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added new reviews