Hi Marcin,
some comments on the script:
I ran it on the Dutch wiki code
http://wiki.services.openoffice.org/wiki/Mnemonics_NL
Then I grepped some random strings from the report:
(hoping that I understand the output correctly)
# grep "Normaal" nl_report.txt
Local menu: Beel~d Inconsistent shortcuts for commands: ~Normaal ---
~Niet-afdrukbare tekens
Local menu: Beel~d Inconsistent shortcuts for commands: ~Normaal ---
~Niet-afdrukbare tekens
Local menu: Beel~d Inconsistent shortcuts for commands: ~Normaal ---
~Niet-afdrukbare tekens
There are 3 occurences of "~Normaal" and 3 occurences of
"~Niet-afdrukbare tekens" in the wiki code, however, these 2 menu items
are never together under the "Beeld" menu.
The same is for
# grep "Kop-" nl_report.txt
Local menu: ~Bewerken Inconsistent shortcuts for commands: Kop- en
voet~tekst... --- Pun~ten
Local menu: ~Bewerken Inconsistent shortcuts for commands: Kop- en
voet~tekst... --- ~Tekst selecteren
Local menu: ~Bewerken Inconsistent shortcuts for commands: Kop- en
voet~tekst... --- Pun~ten
Local menu: ~Bewerken Inconsistent shortcuts for commands: Kop- en
voet~tekst... --- ~Tekst selecteren
Local menu: ~Bewerken Inconsistent shortcuts for commands: Kop- en
voet~tekst... --- ~Tekst selecteren
Again, all 3 menu items exist in the menus under Bewerken, however,
there are never "Kop- en voet~tekst..." together with "Pun~ten" or with
"~Tekst selecteren".
One more thing:
# grep "align" nl_report.txt
Inconsistent shortcuts: | 239683 - align="center"| p -
align="center"| p
Inconsistent shortcuts: | 239681 - align="center"| k - align="center"| k
... (more lines)
I didn't have time for a deeper dive into the code of the script
(moreover I'm not really familiar with awk), therefore I cannot help you
to fix the script but I hope you find the above comments at least
somehow useful...
Regards,
Petr
Marcin Miłkowski napsal(a):
Hi,
I see that mnemonics checking
(http://wiki.services.openoffice.org/wiki/Mnemonics_Localisation)
is not really successful yet. So I created a little script in AWK that
reports which shortcuts are already assigned etc. If it doesn't
complain, the shortcuts are perfect (it requires unique assignments).
You can find the script in CVS here:
http://pl.openoffice.org/source/browse/pl/apps/check_mnemonic.awk
How to use? Copy the wiki page for your language to a text file called
foobar.txt and run the script:
gawk -f check_mnemonic.awk foobar.txt >report.txt
You can even edit the wiki page offline, the script accounts for edits.
Any comments welcome, although I must admit I won't have time to make it
much smarter. I hope we'll have better mnemonics for 2.3.
By the way, in English (and other languages) there are some absurd
shortcuts for commands which are by design disabled like "Can't undo"
and "Can't restore". I would strongly recommend deleting shortcuts for
such commands.
Regards,
Marcin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]