Re: where to find a string
Bjørn Steensrud <bjornst-TkLtEUP6YyJt+tyI2NedBz+iFHGzDt/[email protected]> Mon, 14 Jun 2010 21:27:29 +0200
| Newsgroups | gmane.linux.mandrake.cooker.internationalization |
|---|---|
| Message-ID | <[email protected]> |
Mandag 14. juni 2010 16.42.36 skrev Catalin Florin RUSSEN :
> Open Kate (KDE advanced text editor) and search the string in the .po files
> in your svn-mandriva local copy. This is what I'm doing. You can aslo
> torture yourself with the command line, but I can't help you with that.
> But here's what you find in the translator's wiki section:
> (http://wiki.mandriva.com/en/Tips_for_translators)
>
> grep
> + To search for a specific string, in all the ".po" files of your
> language, within your local svn repository, ...
>
> point your terminal to the svn directory...
> cd /path/to/svn-mandriva/
>
> search...
> grep -li 'string text' */xx.po
>
>
>
> where...
>
>
>
> grep the search utility
>
>
> -l list the files containing the
> given text
>
>
> i ignore uper/lower case
>
>
> 'string text' the text in question
>
>
> */ any subdirectory (1 level depth)
>
>
> xx the 2+ letters of your language
>
>
> + To search for a specific string, in any type of file, within a
> folder, and it's subfolders, ...
>
> grep -lir 'string text' *
>
>
>
> where (aditionaly)...
>
>
> r search subfolders
>
>
> * any type of file
>
> Cheers!
> Florin Catalin RUSSEN
> Romanian Translation Team
Here's a one-liner to use in the mandriva directory:
find . -name "*.pot" -exec grep -il "connection failed" {} \;
Find in the current directory and all its subdirectories
files named anything followed by .pot
for each file, find the string "Connection failed", not case sensitive, and
list the file names where this string is found.
Of course you can search on .po-files as well :-)
Bjørn
Norwegian Bokmål Translation Team
Oh, and "Connection failed" is in network-tools ...