Re: Finding strings in GNOME

понеділок, 10 травня 2021 р. 18:26:21 EEST Matej Urban via gnome-i18n 
this method of yours actually works perfectly!
Is it possible to extend this script to use multiple locations as there are
at least 2 ...

   - /usr/share/locale/da/LC_MESSAGES/
   - /usr/share/locale-langpack/da/LC_MESSAGES/

and to also include .mo and .po files.

Sure. find takes several arguments. For example, to search in POs you can use

-name '*.mo' -o -name '*.po'

To combine several directories just add more finds

`find /usr/share/locale/da/LC_MESSAGES -name '*.mo'` `find /home/your_user/pos -
name '*.po'`

Best regards,

Anyhow, thank you very much, it is usable as in this form also!

On Mon, May 10, 2021 at 3:41 PM Ask Hjorth Larsen via gnome-i18n <

gnome-i18n gnome org> wrote:
Am Mo., 10. Mai 2021 um 02:17 Uhr schrieb scootergrisen via gnome-i18n

<gnome-i18n gnome org>:
Den 09-05-2021 kl. 23:21 skrev Daniel Șerbănescu:
În data de Du, 09-05-2021 la 22:37 +0200, Matej Urban via gnome-i18n a

Hello, I need a bit of help.
I frequently see strange translations, but then can not find, which
packet those belong to. Is there a simple way to find them?

Hello Matej,
Here are the steps I usually do:
1. On your language team page in Damned Lies open a release page (Like
Gnome 40). There is a link to download all the .po files, it is
at the bottom of translation statistics. So click that link to
E.g. For the Romanian team the link would be at the bottom os this

2. Extract the .po files in a folder
3. Open a terminal in that folder
4. Use the following grep command: grep -ri "the string you are
for" *
(replace "the string you are looking for" with the actual search

Be aware that there can be memonics in the original string so you
try searching for a part of that string.

Do anyone know how to ignore these "_" memonics that might be in

So i can search for "Test" and i will find all these:

With pyg3t [1] you can do:
    gtgrep --accel=_ Test filename.po

It ignores the accelerator character when matching and also prints the
whole msgid+msgstr+comments rather than just the matching line.

For checking files in many directories, one would use find and xargs.

    find -name "*.po" | xargs gtgrep --accel=_ Test


Best regards
gnome-i18n mailing list
gnome-i18n gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]