I am having troubles getting the patch to apply.

Hunk #1 FAILED at 160.
Hunk #2 FAILED at 223.

I get an error message without the patch.

warning: Missing argument 1 for locale()

Comments

gábor hojtsy’s picture

What Drupal version?

jose reyero’s picture

Status: Active » Postponed (maintainer needs more info)

Tried with 5.5 and the patch applies cleanly.

LsasS’s picture

The same problem detected in Drupal 5.6:
Missing argument 1 for locale() in www\modules\locale\locale.module on line 163.

gábor hojtsy’s picture

LsasS: that was after you applied the included patch successfully, as explained in the README? (if you did apply it and it worked, then your comment is not related, if you did not apply it then your comment is not related either). Only if you applied the patch and found an error applying it, your comment belongs here. In which case you should see a patch error, not a Drupal error. So I am confused.

emackn’s picture

just in case it helps, for linux

cp <drupal-root>/sites/all/modules/l10n_client/locale_module.patch <drupal-root>/modules/locale
cd <drupal-root>/modules/locale
patch locale.module locale_module.patch

and systeme should respond with
patching file locale.module

jelatinas’s picture

StatusFileSize
new3.63 KB

I'm using Drupal 5.5 and go the same message below while typing: patch locale.module locale_module.patch (I'm at root/modules/locale)

Hunk #1 FAILED at 160.
Hunk #2 FAILED at 223.

Let me know if you need any more info.

Jesse

gábor hojtsy’s picture

You should apply the patch from the root folder, not in the locale module folder.

jelatinas’s picture

I followed emackn steps above....so those steps are wrong?

I tried running my root the following:

patch -p0 locale_module.path

...and got the following:

Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: locale.module
|===================================================================
|RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
|retrieving revision 1.155
|diff -u -r1.155 locale.module
|--- locale.module 27 Dec 2006 13:11:59 -0000 1.155
|+++ locale.module 2 Oct 2007 22:54:19 -0000
--------------------------
File to patch:

What should I type there? what am I doing wrong?

Please help. thanks.

gábor hojtsy’s picture

Hm, well, the file to patch is modules/locale/locale.module

pasqualle’s picture

StatusFileSize
new17.62 KB

@Gabor actually this patch is written relative to locale module folder not from drupal root folder

change the first line in patch toIndex: modules/locale/locale.module

or use the attached locale.module (patched drupal 5.7)

pasqualle’s picture

Status: Postponed (maintainer needs more info) » Fixed
pasqualle’s picture

Status: Fixed » Needs review

the patch should be fixed

Romasito’s picture

Do we have a patched locale.module for Drupal 5.8? Because for that version running patch, i get the following:

[path to drupal modules dir]\locale>patch -n -i locale_module.patch
patch: **** Only garbage was found in the patch input.

That probably means that in locale.module things changed and patch is invalid as of 5.8.

jose reyero’s picture

Status: Needs review » Fixed

I've tried the patch 2 days ago and it works

EllECTRONC’s picture

Status: Fixed » Closed (fixed)

I've tried this patch on 5.7, 5.8, 5.9 and patch works!

lukas2me’s picture

Hey. Just so you know
The patch also works for 5.12 perfectly.

Just simply copy files located in /modules/l10n_client/locale/ to the/modules/locale/