LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-30-2012, 02:43 PM   #16
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled

Here we are. I don't know if it really works like expected.

I've modified the script in a way that it creates a new file oldfile.pot <-> oldfile_translated.pot

I'll append the script to this posting.

Markus
Attached Files
File Type: txt en_AU.pl.txt (22.3 KB, 12 views)
 
1 members found this post helpful.
Old 10-31-2012, 01:17 AM   #17
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Original Poster
Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
Wow, Markus that works a treat thanks so much for all your hard work I really, really, do appreciate it. It does create the file as you described but I am fine with that. I would like to add you to the credits of the translation file how would you prefer I do this? PM your answer if you wish and I'll add it as soon as I can.

P.S. Sorry for not replying much sooner I was called to work today and have only just got home.

Thanks again, muchly appreciated.
 
Old 10-31-2012, 06:46 AM   #18
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Well, I'm happy to read that it works for you. I'd suggest that you learn a little bit of Perl, it can be very helpful.

BTW: if you want the translated files to reside in the "translated" directory, you could simply add the directory to the path of the open-command
Code:
open ">>$newfile";
becomes
Code:
open ">>./translated/$newfile";
and then you could also delete the line which creates the new filename
Code:
$newfile =~ s/\.po/_translated\.po/;
But different filenames for input and output files help to not mess things up.

Markus
 
1 members found this post helpful.
Old 10-31-2012, 01:36 PM   #19
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Original Poster
Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
Thanks again Markush. I will give those tips a go on the weekend when I can sit and take a good long look at it. Last night after I posted I translated all of Gnome 3.6 ui. I am now proof reading it, that is something that will never change, and picking up little bits I can add to the script for translation that have been left out of the original file.

Thanks again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl script to modify text file Eppo Programming 4 04-14-2012 04:53 PM
could perl script modify a file directly ?? casualzone Programming 14 08-07-2011 03:32 AM
how to modify a line of a file using shell script? shayori Linux - Newbie 9 04-16-2010 02:44 AM
Create a script that will modify a text file KSUA Linux - General 5 03-16-2008 08:31 AM
modify content in a file using shell script fjkum Linux - Newbie 2 08-03-2006 04:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration