dkuspawono / pseudolocalization-tool

Automatically exported from code.google.com/p/pseudolocalization-tool
Apache License 2.0
0 stars 0 forks source link

Document how to use pseudolocalizer for ExtJS apps #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.
Our app has a lot of Ext JS based UI and I would like to test localization. 
Right now we use Selenium and do a functional test approach which I feel is 
just too much for the kind of test cases that we run. How do I go about 
starting? Say a simple login page which has a username, password and login 
button? With it's own CSS files?

Original issue reported on code.google.com by Testerga...@gmail.com on 13 Feb 2013 at 6:22

GoogleCodeExporter commented 8 years ago
So are your strings extracted into a message catalog?  What format is it?  If 
it is Java properties files, you can do it right now with the command-line 
tool, running pseudolocalizer foo.properties will create 
foo_psaccent.properties and then use that to produced the localized app.

If you need a different format, you will need to write a MessageCatalog 
implementation for it, but that isn't hard -- look at JavaProperties for an 
example.

Original comment by jat@jaet.org on 13 Feb 2013 at 8:00

GoogleCodeExporter commented 8 years ago

Original comment by jat@jaet.org on 13 Feb 2013 at 8:01

GoogleCodeExporter commented 8 years ago
Sorry if I am sending this multiple times. Google is behaving weird today :(
Our app uses xml files for labels and we have one xml file per locale. The 
suggestion to use command line tool seem to apply at development time. I am 
looking at using the tool during QE cycles and also for regression testing. We 
have a pretty robust autobuild system built on Java. We have java and selenium 
based automation as our functional regression test suites. I want to 
incorporate Pseudolocalizer as part of the localization testing framework 
(currently we use Selenium to do this and I feel like it is an overkill). I am 
a lead QE engineer and hence I am exploring options to design a framework for 
localization testing of our app that produces great results and consumes as 
little time as possible to run end to end, so our dev team will be more 
encouraged to run the tests on their local before checking in. 
I appreciate your guidance so far! Thanks a lot for your time!

Original comment by Testerga...@gmail.com on 15 Feb 2013 at 7:28

GoogleCodeExporter commented 8 years ago
pseudolocalizer [--ext=fqcn[,fqcn...]] 
[--variant=varname|--method=method[,method...] [--type=filetype]
  [<--interactive|files>]

using this commandline tool seems to be a bit tedious when I have thousands of 
css classes. And we don't always have classnames for our elements and we use 
dynamic ext ids as well. Do you have any suggestions on how to go about using 
this in this case? Here's a sample page source html from one of our public 
pages. Can you please let me know how I can use the tool to test similar pages? 
- <div id="filtersPanel" class=" x-panel x-panel-noborder x-border-panel" 
style="left: 0px; top: 0px; width: 1710px;"><div class="x-panel-bwrap" 
id="ext-gen106"><div class="x-panel-body x-panel-body-noheader 
x-panel-body-noborder" id="ext-gen107" style="height: 160px; width: 
1710px;"><div id="filterContainerPanel" class=" x-panel" style="width: 
1710px;"><div class="x-panel-bwrap" id="ext-gen131"><div class="x-panel-body 
x-panel-body-noheader" id="ext-gen132" style="width: 1710px; height: 
160px;"><div id="filterPanel" class=" x-panel filterPanel" style="width: 
1710px;"><div class="x-panel-bwrap" id="ext-gen134"><div class="x-panel-tbar 
x-panel-tbar-noheader" id="ext-gen135" style="width: 1710px;"><div 
id="ext-comp-1060" class="x-toolbar x-small-editor sectionHeaderBar 
x-toolbar-layout-ct" style="width: 1710px;"><table cellspacing="0" 
class="x-toolbar-ct"><tbody><tr><td class="x-toolbar-left" align="left"><table 
cellspacing="0"><tbody><tr class="x-toolbar-left-row"><td 
class="x-toolbar-cell" id="ext-gen157"><div class="xtb-text filterPanelLabel" 
id="ext-comp-1061" style="width: 53px;"><span>Filters</span></div></td><td 
class="x-toolbar-cell" id="ext-gen158"><table id="filterPanel_addFilterButton" 
cellspacing="0" class="x-btn addFilterButton x-btn-noicon" style="width: 
auto;"><tbody class="x-btn-small x-btn-icon-small-left"><tr><td 
class="x-btn-tl"><i> </i></td><td class="x-btn-tc"></td><td 
class="x-btn-tr"><i> </i></td></tr><tr><td class="x-btn-ml"><i> </i></td><td 
class="x-btn-mc"><em class="x-btn-split" unselectable="on"><button 
type="button" id="ext-gen159" style="" class=" 
x-btn-text">Add</button></em></td><td 
class="x-btn-mr"><i> </i></td></tr><tr><td class="x-btn-bl"><i> </i></td><td 
class="x-btn-bc"></td><td 
class="x-btn-br"><i> </i></td></tr></tbody></table></td></tr></tbody></table></
td><td class="x-toolbar-right" align="right"><table cellspacing="0" 
class="x-toolbar-right-ct"><tbody><tr><td><table cellspacing="0"><tbody><tr 
class="x-toolbar-right-row"><td class="x-toolbar-cell" id="ext-gen160"><label 
id="ext-comp-1066" for="ext-gen26" class=" filter-form-item-label ">Filter 
Language</label></td><td class="x-toolbar-cell" id="ext-gen161"><div 
class="x-form-field-wrap x-form-field-trigger-wrap" id="ext-gen162" 
style="width: 170px;"><input type="hidden" name="filterLanguage" 
id="ext-gen164" value="1"><input type="text" size="24" autocomplete="off" 
id="ext-gen26" class="x-form-text x-form-field filterLanguage x-trigger-noedit" 
style="width: 143px;" title="" readonly=""><img src="/s.gif" alt="" 
class="x-form-trigger x-form-arrow-trigger" id="ext-gen163" 
style=""></div></td></tr></tbody></table></td><td><table 
cellspacing="0"><tbody><tr 
class="x-toolbar-extras-row"></tr></tbody></table></td></tr></tbody></table></td
></tr></tbody></table></div><div id="filterPanel_sfp" class=" stdFilters 
x-table-layout-ct"><table class="x-table-layout" cellspacing="0" 
style="width:100%;"><tbody><tr><td class="x-table-layout-cell firstLabelTd" 
rowspan="1" id="ext-gen138" style="width: 57px;"><div id="ext-comp-1050" 
class=" firstLblContainer" style="width: 57px;"><label id="ext-comp-1051" 
for="scope-ext-gen18" class=" filter-form-item-label bold 
firstLabel">Show</label></div></td><td class="x-table-layout-cell" rowspan="1" 
id="ext-gen139"><div id="ext-comp-1052" class=" stdPlugins"><div 
id="ext-comp-1053" class=" stdPluginWrapper"><div class="x-form-field-wrap 
x-form-field-trigger-wrap" id="ext-gen145" style="width: 179px;"><input 
type="text" size="24" autocomplete="off" id="scope-ext-gen18" name="scope" 
class="x-form-text x-form-field scope x-trigger-noedit" title="" readonly="" 
style="width: 152px;"><img src="/s.gif" alt="" class="x-form-trigger 
x-form-arrow-trigger" id="ext-gen146" 
style=""></div></div></div></td></tr><tr><td class="x-table-layout-cell 
firstLabelTd" rowspan="1" id="ext-gen141" style="width: 57px;"><div 
id="ext-comp-1054" class=" firstLblContainer" style="width: 57px;"><label 
id="ext-comp-1055" for="ext-gen20" class=" filter-form-item-label bold 
firstLabel">Date Field</label></div></td><td class="x-table-layout-cell" 
rowspan="1" id="ext-gen142"><div id="ext-comp-1056" class=" x-panel dateFilters 
x-panel-noborder"><div class="x-panel-bwrap" id="ext-gen143"><form 
class="x-panel-body dateFiltersBody x-panel-body-noheader x-panel-body-noborder 
x-form x-box-layout-ct" method="POST" id="ext-gen24"><div class="x-box-inner" 
id="ext-gen147" style="width: 1642px; height: 22px;"><div 
class="x-form-field-wrap x-form-field-trigger-wrap x-box-item" id="ext-gen148" 
style="width: 130px; left: 0px; top: 0px;"><input type="text" size="24" 
autocomplete="off" id="ext-gen20" name="dateColumn" class="x-form-text 
x-form-field dateColumn x-trigger-noedit" style="width: 103px;" title="" 
readonly=""><img src="/s.gif" alt="" class="x-form-trigger 
x-form-arrow-trigger" id="ext-gen149" style=""></div><label id="ext-comp-1057" 
for="duration-ext-gen17" class=" filter-form-item-label  x-box-item" 
style="left: 140px; top: 0px;">Range</label><div class="x-form-field-wrap 
x-form-field-trigger-wrap x-box-item" id="ext-gen150" style="width: 100px; 
left: 180px; top: 0px;"><input type="text" size="24" autocomplete="off" 
id="duration-ext-gen17" name="duration" class="x-form-text x-form-field 
duration x-trigger-noedit" style="width: 73px;" title="" readonly=""><img 
src="/s.gif" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen151" 
style=""></div><label id="ext-comp-1058" for="ext-comp-1044" class=" 
filter-form-item-label  x-box-item" style="left: 290px; top: 
0px;">From</label><div class="x-form-field-wrap x-form-field-trigger-wrap 
x-box-item" id="ext-gen152" style="width: 95px; left: 321px; top: 0px;"><input 
type="text" size="10" autocomplete="off" id="ext-comp-1044" name="startDate" 
class="x-form-text x-form-field startDate" title="" style="width: 68px;"><img 
src="/s.gif" alt="" class="x-form-trigger x-form-date-trigger" id="ext-gen153" 
style=""></div><label id="ext-comp-1059" for="ext-comp-1047" class=" 
filter-form-item-label  x-box-item" style="left: 426px; top: 
0px;">To</label><div class="x-form-field-wrap x-form-field-trigger-wrap 
x-box-item" id="ext-gen154" style="width: 95px; left: 443px; top: 0px;"><input 
type="text" size="10" autocomplete="off" id="ext-comp-1047" name="endDate" 
class="x-form-text x-form-field endDate" title="" style="width: 68px;"><img 
src="/s.gif" alt="" class="x-form-trigger x-form-date-trigger" id="ext-gen155" 
style=""></div></div></form></div></div></td></tr></tbody></table></div></div><d
iv class="x-panel-body x-panel-body-noheader" id="ext-gen136" style="overflow: 
auto; width: 1710px; height: 78px;"><div id="filterPanel_cfp" class=" 
cfPanel"><div id="filterPanel_cfp_noFilterText" class=" noFilterText">To add 
filters, click Add.</div><div id="filterPanel_cfp_booleanFilterSection" class=" 
cfPanel_booleanFilterSection x-hide-display" style=""></div><div 
id="filterPanel_cfp_fieldFiltersSection" class=" cfPanel_fieldFilterSection 
x-hide-display" style=""></div><div id="filterPanel_cfp_objectFiltersSection" 
class=" cfPanel_objectFilterSection x-hide-display" style=""></div><div 
id="filterPanel_cfp_topNFilterSection" class=" cfPanel_topNFilterSection 
x-hide-display" 
style=""></div></div></div></div></div></div></div></div></div></div></div>

Original comment by Testerga...@gmail.com on 21 Feb 2013 at 7:43

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
It should already handle any HTML -- so if you have that text saved in an HTML 
file, you can just run pseudolocalizer foo.html and it will generate 
foo_psaccent.html, or likewise pseudolocalizer --variant=psbidi foo.html => 
foo_psbidi.html.

If your XML contains non-HTML, then you might need to write your own equivalent 
of HtmlPreserver that parses it properly (HtmlPreserver uses the HtmlParser 
library, and if it can't parse the input it will leave it unchanged).

Original comment by jat@jaet.org on 9 Mar 2013 at 1:50