The source strings contain some tags <br/> instead of <br /> (missing space is wrong) which will cause importing translations, which also contain this, to fail. It is also not a correct tag so far. So this should be fixed.

There are also several hard coded strings with 'points' instead of '!points'. To have a unique naming this could be fixed in my eyes.

CommentFileSizeAuthor
#3 userpoints_090701.patch6.75 KBtlogan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kbahey’s picture

Status: Active » Needs work

Need a properly formatted, working and tested patch as per http://drupal.org/patch

jredding’s picture

or at the very least be more specific. Which page did you see these on?

tlogan’s picture

Status: Needs work » Needs review
FileSize
6.75 KB

Heh... I was just about to post a similar issue with a small patch to fix the 1 missing ! that I encountered. After seeing this, I went back and found several more. This is the first patch I've created so if I did something wrong, a little gentle correction would be appreciated.

kbahey’s picture

Status: Needs review » Fixed

Thank you! That is more like it.

Committed to 6.x-1.x-dev and should be available in a few hours in the tarball.

FrankT’s picture

Status: Fixed » Needs review

Thanks so far, this strings is left containing a <br/>:
If you have used userpoints_basic prior to v3 you may need to enable this fix.<br/>[...] (at least two times within this longer string)

The are also still strings left containing hard coded 'points':

These settings affect new !points only, they are not retroactive!\n
                        Point expiration depends upon cron.

Points accumulated by users on your site.
The number of points to award
Out of a maximum points
Points accumulated by users on your site.
A User's current points.
Grant points to a user
Number of points
Current Points

Im not sure about the string 'Points' itself. Also about the string '!Points' (with singular and plural) and !points: is is the default value for the user defined branding of 'Points'?

Unsure about Word to use in the interface for the upper case plural word !Points and Word to use in the interface for the lower case plural word !points, too.

Shouldn't the string 'Approve Userpoints' be changed, too, to allow the use of !points?

jredding’s picture

Status: Needs review » Fixed
FrankT’s picture

Version: 6.x-1.x-dev » 6.x-1.0
Status: Fixed » Active

Checked against todays (surprising) V6.x-1.0 but it is not fixed, neither the br-trag nor the strings containing hard coded 'points'.

FrankT’s picture

I also found out that on page ?q=admin/user/userpoints/add there are !Points appearing instead of the value that it represents (it refers to my translated interface, but on other pages it worked). If you want it as a separate issue, please let me know.

kbahey’s picture

Status: Active » Fixed

Fixes never go in stable releases. They go to the -dev version.

Check that version.

jredding’s picture

I just checked against dev and stable and both of this are fixed.

Please be more specific with you bug reports.

What line number are you seeing this on because a search for these strings does not render a positive result.

FrankT’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Fixed » Active

I applied todays dev version first. Then I extracted userpoints_basic including the translations. On line 51 (as poedit says) there is a string

If you have used userpoints_basic prior to v3 you may need to enable this fix.<br/>\n
                             If you have not used userpoints_basic prior to v3 you do NOT need to enable this fix. <br/>\n
                             This fix only affects the behavior of how !points are handled when ownership of a node/comment\n
                             changes. In version 2 data on the original owner was not kept and a static variable was used to \n
                             store this information. Unfortunately people have experienced unusual side effects such as\n
                             !points moving from one owner to a completely random user. All !points accrued with version 3 will\n
                             not exhibit this behavior thus this fix is unnecessary. \n
                             Only check this box under the following conditions <br/>\n
                             1) You have existing !points granted by a userpoints version prior to version 3 <br />\n
                             2) If ownership changes on a node/comment you want points to follow ownership <br />\n
                             <i>All !points accrued by version 3 will move ownership automatically this setting only affects !points accrued with v2</i>\n
                             <br />\n
                             3) You have read <a href=\"http://drupal.org/node/183520\">Article 183520</a> on drupal.org and \n
                                understand that there could be unusual issues with ownership moves

The first and second line and the line before 1) contain a (so at least 3 occurences).

I made some random tests on the strings mentioned in #5 (http://drupal.org/node/355042#comment-1189087) but they seem to be unchanged, too. But I suggest to concentrate on the <br/> first.

With the latest dev a new string with a hard coded 'points' instead of !points was introduced:
Select which category of points to display on the user profile page. Select \"All\" to display a sum total of all categories

jredding’s picture

I am not sure where you are downloading userpoints but it is not from drupal.org. Stable version 6.x and DEV Version 6.x no longer contain userpoints_basic.

Please verify your download location and that you are looking at the latest version of either DEV or Stable version 6.

jredding’s picture

hhmm.. well you are getting part of the latest dev since that is a new string.

Its very confusing as to how you are seeing userpoints_basic though so that no longer exists.

FrankT’s picture

Based on your last comment I decided to completely remove the module (disable, uninstall, delete the directory) and then reinstalled the module. After that there is no more userpoints_basic module. I cannot reproduce it and I don't know with which version of userpoints I started (but definitively V6.x), but it looks like some update problem.

I updated my translation file and can confirm that there is no <br/> any more.

Now in this issue we can concentrate on hard coded 'Points'

Currently I see the strings
Points accumulated by users on your site.
Out of a maximum points
Points branding
The number of points to award
Points accumulated by users on your site.
Points
A User's current points.

These settings affect new !points only, they are not retroactive!\n
                        Point expiration depends upon cron.

Im not sure about the string 'Points' itself. Also about the string '!Points' (with singular and plural) and !points: is is the default value for the user defined branding of 'Points'?

Shouldn't the string Approve Userpoints be changed, too, to allow the use of !points?

On the other side there still is the problem mentioned in #8 (I can still create a spearate issue for that).

jredding’s picture

Based on your last comment I decided to completely remove the module (disable, uninstall, delete the directory) and then reinstalled the module. After that there is no more userpoints_basic module. I cannot reproduce it and I don't know with which version of userpoints I started (but definitively V6.x), but it looks like some update problem.

I updated my translation file and can confirm that there is no
any more.

Good I'm glad that we got the issue taken care of.

Now in this issue we can concentrate on hard coded 'Points'
Currently I see the strings
Points accumulated by users on your site.
Out of a maximum points
Points branding
The number of points to award
Points accumulated by users on your site.
Points
A User's current points.
These settings affect new !points only, they are not retroactive!\n
Point expiration depends upon cron.

To make things easier for module maintainers please post the files as well as line number that you found these strings. They are listed when you use poedit (or whichever application you are using). In either case I searched for these and fixed them as necessary. A few of them are left as "Points" because they are admin facing strings and make the most sense as staying as "Points". For example "Points Branding" shouldn't be changed as it accurately describes what you are doing branding or rebranding the original item that is "points".

I also found a few other strings that weren't properly ran through userpoints_translation(), they have been fixed.

Im not sure about the string 'Points' itself. Also about the string '!Points' (with singular and plural) and !points: is is the default value for the user defined branding of 'Points'?

I'm confused by this statement, please clarify.

Shouldn't the string Approve Userpoints be changed, too, to allow the use of !points?

Yes and it has been fixed. This page used to be a "hidden" page until a confirmation was added because of this it slipped through the t() radar.

On the other side there still is the problem mentioned in #8 (I can still create a spearate issue for that).

fixed

FrankT’s picture

Thanks, sounds great. I will check it as soon as possible (and after the new dev is available). As my holidays are ending today it could take some days.

FrankT’s picture

The following strings are left with a hard coded 'point':
Points branding I guess it is intended as the main place where the branding happens. I can agree.
Points ???
Number of Points
Current Points
Users earn points as they post nodes, comments, and vote on nodes. I think it could remain like that.

There is a special thing about a translatable string !points and !Points (so I come back to your request for further information on that). I also should add that I cannot read much in the programming code itself, that's why I need to ask.

I always understood !points as kind of a variable, the value of which is being entered as 'points branding'. So I currently do not know how to handle it.
- Is it the initial setting of the translated word for points?
- Or is it just a variable and therefore should not be translatable?
- or is it a possibility to translate !points as !Points if needed?
- etc.?

jredding’s picture

Some of the points have to remain as points, the module after all is called userpoints. If we changed every "points" to whatever was in branding it would become confusing. Or in short, the four "untranslated" strings you placed here will remain untranslated.

There is a special thing about a translatable string !points and !Points (so I come back to your request for further information on that). I also should add that I cannot read much in the programming code itself, that's why I need to ask.

I always understood !points as kind of a variable, the value of which is being entered as 'points branding'. So I currently do not know how to handle it.
- Is it the initial setting of the translated word for points?
- Or is it just a variable and therefore should not be translatable?
- or is it a possibility to translate !points as !Points if needed?
- etc.?

Points branding is meant as a quick and easy way to change the word points into a new brand for your website. It is not intended for wholesale translation of a website. You will need to use the locale module for that (or any of the i18n or l10n modules).

In regards to your questions. !Point, !points, !point are all variables according to what is in points branding.
so t("You have earned 5 !points", userpoints_translation())
would translate !points to whatever is in branding for example
"You have earned 5 brownies".

Berdir’s picture

Status: Active » Fixed

Looks like everything here has been addressed, so let's close this issue. Note that the branding feature currently doesn't work together with translations, see #791734: Translation of Branded Points.

Status: Fixed » Closed (fixed)

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