I want to run through the strings to have them make more sense. Both from a coder's POV and that of a translator.

Some issues:

  • One thing I'll probably do is to rip out [foo] and replace them with [@token].
  • Another thing is the WARNINGs for -raw tokens shouldn't be used for Pathauto, as they're actually what should be used. (Should the WARNINGs be used for non-raw tokens instead?)
  • The pathauto_help() text could also use a bit of niceness sprinkled on it.
  • There are a few strings that need to merged in some places.

Comments

greggles’s picture

The WARNING is something that comes from the hook_token_list implementation, so I'm not sure how you can clean it up. Otherwise - sounds great to me.

Freso’s picture

Well, since we're calling the strings, we decide which strings to call. It should be as easy as that. Or, wait. Are these strings (in pathauto_token_list()) going into some kind of global registry? Ie., used by token in places outside the realm of pathauto? (/me should probably read up on how Token module operates...)

greggles’s picture

going into some kind of global registry? Ie., used by token in places outside the realm of pathauto?

That's correct - it's a global listing.

Freso’s picture

Ah, alright then. Well, that's one item off the list to do/clean. :)

Freso’s picture

smk-ka pointed out in #247758: Use Transliteration module for transliteration that the transliteration text in pathauto_admin_settings() should be split up.

Freso’s picture

Status: Active » Needs work
StatusFileSize
new10.78 KB

Here's a first take. I haven't gotten around to rip out tokens, but I noticed a few places that didn't have proper punctuation as well as strings that could have HTML ripped out of them. I'm also not quite satisfied with the way pathauto_help() is right now - which hasn't been "pot'ed" yet either, so I don't know what the msgid will look like. But now there's at least something more concrete to discuss. :)

I'd also suggest that, depending on how we're going to handle things post-branching off for #247758: Use Transliteration module for transliteration, that we wait with checking this clean in and make it go into 6.x-2.x instead. But I'll poke you about that in a mail, I think. :)

Freso’s picture

Marked #264319: Clean up pathauto_help() a duplicate of this (even if it's just a duplicate of a subset of this issue).

mustafau’s picture

Should I merge #264319: Clean up pathauto_help() with this patch?

Moonshine’s picture

As mentioned on IRC, Pathauto current states the following when choosing a default update action in the admin:

"What should pathauto do when updating an existing content item which already has an alias?"

It's nitpicking, but I really thing this should just say:

"What should pathauto do when updating an existing item which already has an alias?"

As "content items" in Drupal refer to node instances, and this setting also applies to users, taxonomy, etc..

Freso’s picture

Oh, but we certainly do want nitpicking in this issue! Just bring it on! :D

Freso’s picture

Marked #265711: Some UI typos and bugs as a duplicate, which has patch containing some good suggestions/ideas.

hass’s picture

#6 is a bad patch.

Example if something that is absolutely UNSUPPORTED in POTX. You should make separate lines with t() and move the <p> outside. You editor have good line break support. Don't do any line breaks inside t().

+      $output = t(
+        '<p>Provides a mechanism for modules to automatically generate aliases for the content they manage.</p>'
+        .'<h2>Settings</h2>'
+        .'<p>The <strong>Maximum Alias Length</strong> and <strong>Maximum component length</strong> values'
+        .'default to 100 and have a limit of 128 from pathauto. This length is limited by the length of the dst'
+        .'column of the url_alias database table. The default database schema for this column is 128. If you'
+        .'set a length that is equal to that of the one set in the dst column it will cause problems in situations'
+        .'where the system needs to append additional words to the aliased URL. For example... URLs generated'
+        .'for feeds will have "/feed" added to the end. You should enter a value that is the length of the dst'
+        .'column minus the length of any strings that might get added to the end of the URL. The length of'
+        .'strings that might get added to the end of your URLs depends on which modules you have enabled and'
+        .'on your Pathauto settings. The recommended and default value is 100.</p>'
+        .'<p><strong>Raw Tokens</strong> In Pathauto it is appropriate to use the -raw form of tokens. Paths are'
+        .'sent through a filtering system which ensures that raw user content is filtered. Failure to use -raw'
+        .'tokens can cause problems with the Pathauto punctuation filtering system.</p>'

should become:

'<p>'. t('Provides a mechanism for modules to automatically generate aliases for the content they manage.') .'</p>';
'<h2>'. t('Settings') .'</h2>';
'<p>'. t('The <strong>Maximum Alias Length</strong> and <strong>Maximum component length</strong> values default to 100 and a limit of 128 from pathauto. This length is limited by the length of the dst column of the url_alias database table. The default database schema for this column is 128. If you set a length that is equal to that of the one set in the dst column it will cause problems in situations where the system needs to append additional words to the aliased URL. For example... URLs generated for feeds will have "/feed" added to the end. You should enter a value that is the length of the dst.... ') .'<p>';

"there" should be upper case first.

+  $form['warning'] = array('#value' => '<p>'. t('<strong>Note:</strong> there is no confirmation. Be sure of your action before clicking the "Delete aliases now!" button.<br />You may want to make a backup of the database and/or the url_alias table prior to using this feature.') .'</p>');

Thank you for the period fixes in your patch.

Take the other patch first in #265711: Some UI typos and bugs.

Freso’s picture

#6 is a bad patch.

Hence why the status of this issue is "code needs work" - and thank you for your comments with regards to the work needing to be done!

Take the other patch first in #265711: Some UI typos and bugs.

Neither patch will go in before 6.x-2.x development is started. And I believe the changes in #265711: Some UI typos and bugs should be included in this issue. (If you're afraid you won't get credit, don't be. More than one person can help make a patch.) There's no reason to make two commits for what's essentially one task. (Unless it makes sense to do it gradually - but we already have both patches now, so we might as well couple them together (now).)

hass’s picture

It's not a credit or something like this, it's - i don't understand why you close a case that contains a *valid* patch. The patch above does not contain this strings and therefor the strings I changed in the other case get lost, overseen and forgotten. What is the problem if we have two cases with strings corrections until there is a patch that merges both?

I don't know why this typos need to wait for a 2.x branch. It's ok to fix this in 1.1.

Freso’s picture

What is the problem if we have two cases with strings corrections [...]

Division of discussion, the problem is. Having only one issue also means there's only one place to add comments and thoughts to.

I don't know why this typos need to wait for a 2.x branch. It's ok to fix this in 1.1.

Once DRUPAL-6--1-1 is tagged, translations won't be updated for the .tar.gz file. This means that strings that do not exist in the .po will be imported and act as cruft in the "machinery", and as well as less strings that are actually translated. If we wait with these changes, people using 6.x-1.1 will have a more translated interface, if we do them now, all odds are that they'll have a less translated interface than with 6.x-1.0! This is a clear regression, and I don't want to do this. 6.x-1.1 will most likely be the last 6.x-1.x release, with development focus shifting to 6.x-2.x as soon as it is released. If you want these strings to be fixed, go help with the 6.x-1.1 blockers so that we may start 6.x-2.x development sooner.

hass’s picture

If it will be tagged, but today it is not tagged and therefor we are able to commit patches that do not need any work (my patch is RTBC) - the above not.

We are talking here about ~10 string changes in a translation file with 170 strings. It's no - really - no issue to fix and translate them before a 1.1 release. Less then 5% changes and 4% only need caps changes that should already exist in all translations. I don't understand why you don't like to get this in earlier. We are not breaking anything as we are updating translations before the release. Aside this is how the CVS system works for ages... not for future but for past.

hass’s picture

They are okay, but it's easier to navigate patches having been made using the -p argument to [cvs ]diff. See the handbook page I sent you to, I'm pretty sure it tells about it. (Or perhaps it's one of the other patch pages... ? Hm.)

Patches should not build with -p. Your patch is really worse. If i try to apply this i need to tell explise first where to apply as you removed the path in the patch. This is wrong. Read this http://drupal.org/patch/create

hass’s picture

Status: Needs work » Needs review
StatusFileSize
new12.56 KB

New patch attached:

1. Fixes hook_help
2. Better approach for the format_plural change.
3. Merges the string changes from #265711: Some UI typos and bugs

Freso’s picture

Status: Needs review » Needs work

This is looking good. Thank you for this. :)

It doesn't incorporate the comment in #9, nor do you provide an argument for not including it. So this needs some work still though.

I also checked with my Concise Oxford Dictionary, which says that colons aren't followed by a capital letter. (Unless it's a quote/quotation, "I", or other such instances that would normally start with a capitalised letter.)

Patches should not build with -p. Your patch is really worse. If i try to apply this i need to tell explise first where to apply as you removed the path in the patch. This is wrong. Read this http://drupal.org/patch/create

Y'know, all diff calls on that page uses -p - and the section "Readability" recommends using that flag as one of the two best options to achieve this readability. Perhaps you should take a look at it again? :) The reason you're having trouble is not because I'm using -p, but because I'm working from the project's root dir, instead of... sites/all or whatever you're working from. (Also, that patch up there doesn't apply cleanly any longer due to a bunch of code changes having gone in since - so thank you for providing a more up-to-date patch as well!)

hass’s picture

Status: Needs work » Needs review
StatusFileSize
new12.55 KB

I'm not sure what you are talking about regarding code changes. The patch in #18 still applies cleanly.

Now the patch with suggestion from #9.

Freso’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
hass’s picture

Fresco: Why not committing this to 1.x? It's really the FIRST time ever I saw that a module developer considered translations. This is not wrong... but it's really atypical. And it's not so much changes... we can update the po files *very* quick and easy.

greggles’s picture

First, this is not the first time that a developer has considered translations - see http://lists.drupal.org/pipermail/translations/2007-August/000445.html

This is a clear regression, and I don't want to do this. 6.x-1.1 will most likely be the last 6.x-1.x release, with development focus shifting to 6.x-2.x as soon as it is released. If you want these strings to be fixed, go help with the 6.x-1.1 blockers so that we may start 6.x-2.x development sooner.

@hass - Please stop disagreeing on this point. Freso has provided a logical argument for doing these changes in 6.x-2.x and I support his decision. So, it's decided. Arguing is a waste of everyone's time. We've already branched the code for 6.x-2.x (hence it is in the version dropdown) so this can now be committed. It just needs a review now, but arguing about versions is a waste of time that reduces the time left to review the patch.

Freso’s picture

Status: Needs review » Needs work

#247758: Use Transliteration module for transliteration has gone in, changing some strings. So if no other changes have broken this patch before now, now it is most definitely back to CNW.

Freso’s picture

Status: Needs work » Needs review
StatusFileSize
new12.9 KB

So, here's an update against the latest code.

itangalo’s picture

Component: i18n Stuff » I18n stuff

I just reviewed the code for the minor typos I reported in a duplicate issue. They have all been taken care of.

Thanks for redirecting me.

greggles’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

Freso’s picture

Status: Reviewed & tested by the community » Fixed

Committed earlier today, before heading off for work. :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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