Bug 321773 - Webpopups are untranslatable
Summary: Webpopups are untranslatable
Status: CONFIRMED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.6 (KDE 4.11)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL: http://docs.kde.org/development/uk/kd...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-29 18:55 UTC by Yuri Chornoivan
Modified: 2016-08-24 21:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Chornoivan 2013-06-29 18:55:05 UTC
Scripty does not extract messages from /src/lib/webpopup HTML files and even if the messages are extracted translations are not used.

The snippet that has been used to extract messages (patch to Messages.sh):

for fname in src/lib/webpopup/*.html; do
safe_fname=$(printf '%s\n' "$fname" | sed 's/[\&/]/\\&/g')
cat $fname \
  | tr -d '\n' \
  | sed -e 's/<style>.*<\/style>//' -e 's/<link rel[ a-z=":,./]*>//g' \
        -e 's/<!--[- "&'\''./0-9:;<=>A-Z_a-z]*-->[\t ]*/\n/g' \
        -e 's/<[A-Za-z0-9]*\( [a-z:]*=\"[-A-Za-z0-9:/_.% ]*\"\)*>[\t ]*/\n/g' \
        -e 's/<\/[A-Za-z0-9]*>[\t ]*/\n/g' -e 's/%[a-zA-Z!\{\}]*%//g'\
  | sed -e 's/^ *//' -e 's/ *$//' -e 's/^&nbsp;$//' -e '/^$/d' \
  | sed -e 's/^\(.*\)$/\/\/i18n: file .\/'$safe_fname'\ni18n(\"\1\");/' \
  >> rc.cpp
done

Reproducible: Always

Steps to Reproduce:
1. Choose "Satellite View" map in any localized version of Marble.
2. Left-click on arbitrary city on the map.
Actual Results:  
Partially translated popup

Expected Results:  
Complete translation of the popup

Thanks for fixing this bug.
Comment 1 Illya Kovalevskyy 2014-12-13 19:35:48 UTC
I am doing bug triaging as Google Code-In 2014 student.

Marble doesn't own any data, all info we use comes from maps. Maps doesn't provide translated data IIRC.
Comment 2 Yuri Chornoivan 2014-12-13 19:43:47 UTC
(In reply to Illya Kovalevskyy from comment #1)
> I am doing bug triaging as Google Code-In 2014 student.
> 
> Marble doesn't own any data, all info we use comes from maps. Maps doesn't
> provide translated data IIRC.

In fact, it does.

Just look at the HTML files in /src/libmarble/webpopup. Example: third line of the city.html has "Place information" and Marble's webpopup has it as well. ;)
Comment 3 Illya Kovalevskyy 2014-12-13 19:47:39 UTC
Now I got what strings you were talking about. Indeed, these are not translated... Nice catch, thanks!
Comment 4 Myriam Schweingruber 2014-12-14 11:47:56 UTC
Setting status to confirmed.