fdo#39439 : Web search for UI strings

Michael Meeks michael.meeks at collabora.com
Fri Sep 13 03:24:43 PDT 2013


Hi Mat,

On Thu, 2013-09-12 at 00:09 +0200, Mat M wrote:
> > Not really a patch. As discussed in the issue, it is a python webapp to  
> > be setup on a webserver. it just need a readable local bare repo to work.
> > I'd love to commit a patch in opengrok, but I'm afraid my Java score is  
> > not enough :)

	Ok :-) do you have a live demo on-line we can play with ?

> > 	Do you have some code I can read ? :-) it's by far the best to share
> > your python app by posting it to the dev list - please do CC me, I'd
> > love to review (and/or use that).
> 
> I will, as soon as the glade question is solved.

	Ok - you're working on that ? :-)

> > 	If it's a python app - perhaps we can also include a command-line
> > version for users to use to search the git repository with - which would
> > be ideal.
> 
> Well, request was for a web site, forwarding to opengrok. I think in a  
> CLI, you may want a different output. Adding some specs, so ?

	Oh - sure; but if it's a nice standalone python thing then having a
command-line version would be awesome: developers would use that a lot
for lookups I think.

> >
> > 	Do you support the glade format as well as the res format ?
> 
> Hem... The original goal wasd to search in *.[hs]rc to find en-US ref  
> strings and where they are used in the code. I don't manage to bind that  
> with your question.

	:-)

>  Basically, all codes in.ui are stored in a .po file,
> under the same folder structure in the translations repo. Have I missed  
> something ? If you could give a use case, it may become clearer to me.

	Right - so; that is so; but I guess we'd want to avoid the translation/
repository since it's -so- huge :-) Instead I'd just grep for the
strings inside the .ui files. That will map to a filename (at minimum)
eg.

$ git --no-pager grep 'Detailed Calculation Settings'
sc/uiconfig/scalc/ui/formulacalculationoptions.ui:    <property
name="title" translatable="yes">Detailed Calculation Settings</property>

	Which gives us "formulacalculationoptions.ui" - if we grep for that
again it takes us straight to:

git --no-pager grep -2 'formulacalculationoptions.ui'
sc/source/ui/optdlg/calcoptionsdlg.cxx-ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent, const ScCalcConfig& rConfig)
sc/source/ui/optdlg/calcoptionsdlg.cxx-    : ModalDialog(pParent, "FormulaCalculationOptions",
sc/source/ui/optdlg/calcoptionsdlg.cxx:        "modules/scalc/ui/formulacalculationoptions.ui")
sc/source/ui/optdlg/calcoptionsdlg.cxx-    , maCalcA1(ScResId(SCSTR_FORMULA_SYNTAX_CALC_A1).toString())
sc/source/ui/optdlg/calcoptionsdlg.cxx-    , maExcelA1(ScResId(SCSTR_FORMULA_SYNTAX_XL_A1).toString())

	Which is pretty much where we want to be.

	Hopefully that is easy enough ? perhaps easier than all the old-style
src/hrc pieces ?

	I'd love to read the code & get it into git somehow. If it's a
standalone thing then getting developers to use it on the commandline
would be a great (and trivial) 1st start before enabling it on some web
infrastructure I think.

	Anyhow - thanks -so- much for your work - this sounds really exciting;
are you coming to the conference in Milan[1] ? if so - a lightning talk
on this would be great :-)

	ATB,

		Michael.

[1] - travel funding available cf.
http://conference.libreoffice.org/2013/en
-- 
 michael.meeks at collabora.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list