2

Sometimes we find grammatically wrong English sentences or spelling mistakes in some contributed modules. While doing translations, we can translate the way we want.

But how to change these kind of sentences or words, also if the client wants to change it in English? As we know, we can't do changes even in contributed modules.

So, do we need to write custom module or use String Overrides module or contact the maintainer/contributor? Which is the best way to do it?

  • further to what Nugorra said, you may find a much faster and more acceptable response when creating an issue for a module if you provide a patch for the problem. The community will quickly test it and they can commit the patch - the benefit is that if you are the author of the patch, you will have already updated your copy, so that what you have will match the official copy making further updates of the module in sync – Geoff Jun 15 '15 at 16:17
3

Another approach is to use GIT for such contributed modules to actually change such sentences or words. E.g. with the master branch corresponding to the official version of such module, and a branch containing all the changes.

In doing so, it is straight forward to also create a PATCH each time such changes are needed, which you can then also attach to an issue in the issue queue to report about such changes. Bonus: you're contributing to Drupal! ... Which should also show up in your D.O profile ... By creating such "issue" (in the module's issue queue, the module maintainers will get notified automatically (unless they turned of such notifications for their modules). So that's "a" way to contact the maintainer/contributor. Refer to comment #1 in issue # 2327917 for a contributed patch containing only a 1 character typo correction (remove an "s" that was not appropriate), and which I committed afterwards.

If you're not able or willing to create such patch, then at least "report" about it in the issue queue, even if it is only some small issue (in the format of a few lines or text about the typo to be corected). Such issues should get picked up soon by the module maintainers (who will transform that in a patch, etc).

And next time the module gets updated, you use GIT to also update the master branch of that module in your own site. After doing so, you then also use GIT to re-apply all relevant changes that are needed for the new version again. For patches that got accepted in the official version of the module, you won't need to reapply their changes anymore of course.

With this approach, you've reduced your issue to something like maintaining a custom version of a module, and at the same time you're contributing to a permanent solution to reduce the need for such changes in the future.

  • I agree with @Pierrer. You should write a patch upload to Drupal. – itsdarrylnorris Jun 15 '15 at 21:26
  • Merci beaucoup (translation needed ?!?!) @darol100 ... If more people would be willing to "contribute" such types of patches, it would help all those module (co-) maintainers around the world who did not learn English on their mother's knee (like me ...). – Pierre.Vriens Jun 15 '15 at 21:49
  • @Pierre.Vriens does this mean that, if any client needs some custom string I should write a patch for it? – Akshay Jun 17 '15 at 11:30
1

If it's a mistake you should inform the maintainer/contributor so the can change it. Keep in mind that it could be an other english, then there would be no change. (Like compare Brit to US english)

I would do it with String Overrides, and check again on module update.

  • Ok. But String Overrides also has limitations of words. What to do if number of string changes is more than that? – Akshay Jun 15 '15 at 14:47
  • 1
    The boundaries I've so far encountered, were strings outside the t() function. Here my basic approach is to inform the maintainer/contributor and change the String so it is inside t(). You need to keep track of this changes but in the next version it should be ok. – Nugorra Jun 15 '15 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.