I cannot translate the text that appears below the geofield openlayers map widget:
"Use the icons to select what type of feature to draw. Each map can contain one simple feature. Pan and zoom with arrows and the zoom bar."
This text appears as follows in geofield.widgets.openlayers.inc:
'#markup' => t('<div class="description geofield-help">Use the icons to select what type of feature to draw. Each map can contain one simple feature. Pan and zoom with arrows and the zoom bar.</div>')
The problem is that the Drupal translation UI or .po import do not allow translating HTML markup.
I get this error (for a Greek translation):
The submitted string contains disallowed HTML:<div class=\"description geofield-help\">Πατήστε το εικονίδιο με το μολύβι (+) για να ορίσετε συντεταγμένες. Για να διαγράψετε τις συντεταγμένες, πατήστε το διπλανό εικονίδιο, επιλέξτε το σημείο και πατήστε Delete.</div>
So I suggest modifying the code to:
'#markup' => '<div class="description geofield-help">' . t('Use the icons to select what type of feature to draw. Each map can contain one simple feature. Pan and zoom with arrows and the zoom bar.') . '</div>'
Comment | File | Size | Author |
---|---|---|---|
#1 | HTML_separated_in_markup-2214039-1.patch | 814 bytes | cs_shadow |
Comments
Comment #1
cs_shadow CreditAttribution: cs_shadow commentedHere's a quick patch for the same.
Comment #2
yce CreditAttribution: yce commented#1: Thanks, now I can translate nicely with this patch.
Comment #3
SidneyGijzen CreditAttribution: SidneyGijzen commentedTested with Geofield 7.x-2.3. Works perfectly. Thanks!
Comment #4
sano CreditAttribution: sano commentedI have to get into a habit to look first into the Issues before embarking on a hunt to seek through a module source code when encountering problems. I spent maybe 30 minutes doing just that and fixing this issue on my server. Then I came here to submit a patch only to find that it already exists. Oh well...
Comment #5
joseph.olstadI'm using this patch in the make files for media_dev
Comment #7
itamair CreditAttribution: itamair as a volunteer commentedThis has been just committed into dev. Will be pat of the new module 7.x-2.x release
Comment #8
itamair CreditAttribution: itamair as a volunteer commented