We need to change the string from <Hidden> to - Hidden - like we have done everywhere else. These type of "html"-string is detected as an not allowed HTML tag and the translated string fails to import.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BarisW’s picture

Title: Translatable sttring <Hidden> cannot imported if translated » Translatable string <Hidden> cannot imported if translated
Status: Active » Needs review
FileSize
930 bytes
14.31 KB
13.32 KB

I've changed the format from <Hidden> to - Hidden -. However, why the Label field should have <> or - - around the label is unclear to me. The three options (Above, Inline or Hidden) are quite OK like this right?

Patch and screenshots attached.

label.png

format.png

hass’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs backport to D7
hass’s picture

I think the - or <> is there to show that this is a very special setting and not really a format.

droplet’s picture

Status: Reviewed & tested by the community » Needs work
BarisW’s picture

Status: Needs work » Needs review
FileSize
8.22 KB

Ah, yes. That would be better I guess. Patch attached.
While working in the file, I applied some Drupal coding standards as well.

c960657’s picture

FYI:
A similar change was done elsewhere in #1317884: Remove all instances of <none>, <Hidden> and <br/> from translatable strings because they lead to import errors.
The issue about not being able to import strings containing certain special characters (even if you want to) is being discussed in #514926: translated strings shouldn't be validated.

swentel’s picture

Status: Needs review » Needs work

Coding standards are attacked in #1533234: Make field_ui module pass Coder Review - so let's focus on the hidden part.

BarisW’s picture

Status: Needs work » Needs review
FileSize
950 bytes

Allright. Patch attached.

droplet’s picture

Can we mark either one duplicated. I reopen #1317884: Remove all instances of <none>, <Hidden> and <br/> from translatable strings because they lead to import errors as it doesn't really get committed.

and #8 patch may bring out a security problem :

http://drupal.org/node/514926#comment-6497228

swentel’s picture

The security is not an issue at all, but I'm ok with duplicating, your choice.

BarisW’s picture

droplet: that other issue was already closed and committed. They just forgot two strings. Can we not just commit this one and leave the other one closed?

swentel’s picture

Yeah re-read that issue, no point in reopening, let's keep this one.

swentel’s picture

Status: Needs review » Needs work
swentel’s picture

Status: Needs work » Needs review
FileSize
1011 bytes

Rerolled because of the move to classes - can go RTBC when it comes back green.

BarisW’s picture

Status: Needs review » Needs work

The last line contains a double semicolon.

swentel’s picture

Status: Needs work » Needs review
FileSize
1010 bytes

Oh man .. :)

hass’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed/pushed to 8.x, thanks!

dcam’s picture

Status: Patch (to be ported) » Needs review
FileSize
928 bytes

Backported #16 to D7.

hass’s picture

hass’s picture

hass’s picture

Status: Needs review » Reviewed & tested by the community
David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x - thanks!

(And luckily "Hidden" is already a translatable string in Drupal core before this patch, so we're not actually adding new translatable strings at all here.)

  • Commit 0c389ed on 7.x by David_Rothstein:
    Issue #1788060 by BarisW, swentel, dcam | hass: Translatable string...

Status: Fixed » Closed (fixed)

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