From leonhard at kreissig.de Wed Nov 14 15:19:03 2018 From: leonhard at kreissig.de (Leonhard Kreissig) Date: Wed, 14 Nov 2018 16:19:03 +0100 Subject: [zanata-users] Changing base strings Message-ID: <039005E5-E234-44F8-81F1-BEA56254B3C8@kreissig.de> Heyho, I?m currently maintaining a project that contains many faulty base strings (in English). I?ve set up a new translation to English where native speakers corrected the strings. Now I want to swap the strings so in case my i18n tools fail there are correct strings and so ?real? translators for other languages have a good base to work upon. My project uses gettext, so .po/.pot format. I?ve written a script that moves the corrected msgstr?s to the msgid field and the faulty msgid?s to previous_msgid. I hoped Zapata would recognize that and keep all the translations (The translators would be really really angry if they had to start from the beginning). Does anyone have an idea to swap the base strings and keep the translations? My script is capable of inserting the new base strings in already translated po-files, but I can?t upload them to Zapata anyways. Leo From leonhard at kreissig.de Fri Nov 16 14:59:57 2018 From: leonhard at kreissig.de (leonhard at kreissig.de) Date: Fri, 16 Nov 2018 15:59:57 +0100 Subject: [zanata-users] Changing base strings In-Reply-To: <039005E5-E234-44F8-81F1-BEA56254B3C8@kreissig.de> References: <039005E5-E234-44F8-81F1-BEA56254B3C8@kreissig.de> Message-ID: <2b3baa68-54f5-45c9-a062-d5c4dc98caaf@Spark> Anyone? Leo Am 14. Nov. 2018, 16:19 +0100 schrieb Leonhard Kreissig : > Heyho, > > I?m currently maintaining a project that contains many faulty base strings (in English). > I?ve set up a new translation to English where native speakers corrected the strings. > > Now I want to swap the strings so in case my i18n tools fail there are correct strings and so ?real? translators for other languages have a good base to work upon. > > My project uses gettext, so .po/.pot format. > > I?ve written a script that moves the corrected msgstr?s to the msgid field and the faulty msgid?s to previous_msgid. I hoped Zapata would recognize that and keep all the translations (The translators would be really really angry if they had to start from the beginning). > > Does anyone have an idea to swap the base strings and keep the translations? > > My script is capable of inserting the new base strings in already translated po-files, but I can?t upload them to Zapata anyways. > > Leo -------------- next part -------------- An HTML attachment was scrubbed... URL: From camunoz at redhat.com Fri Nov 16 15:48:33 2018 From: camunoz at redhat.com (Carlos Munoz) Date: Fri, 16 Nov 2018 10:48:33 -0500 Subject: [zanata-users] Changing base strings In-Reply-To: <2b3baa68-54f5-45c9-a062-d5c4dc98caaf@Spark> References: <039005E5-E234-44F8-81F1-BEA56254B3C8@kreissig.de> <2b3baa68-54f5-45c9-a062-d5c4dc98caaf@Spark> Message-ID: Hi Leo, I don't think there's a way to automatically do this. Zanata doesn't understand the previous_string field in POT files as far as I know so it won't really have any smarts for it. I guess from my perspective the way I would tackle this is outside of Zanata: just align the right source strings with the right translations and push them to Zanata again. Carlos On Fri, Nov 16, 2018 at 10:44 AM wrote: > Anyone? > > Leo > Am 14. Nov. 2018, 16:19 +0100 schrieb Leonhard Kreissig < > leonhard at kreissig.de>: > > Heyho, > > I?m currently maintaining a project that contains many faulty base strings > (in English). > I?ve set up a new translation to English where native speakers corrected > the strings. > > Now I want to swap the strings so in case my i18n tools fail there are > correct strings and so ?real? translators for other languages have a good > base to work upon. > > My project uses gettext, so .po/.pot format. > > I?ve written a script that moves the corrected msgstr?s to the msgid field > and the faulty msgid?s to previous_msgid. I hoped Zapata would recognize > that and keep all the translations (The translators would be really really > angry if they had to start from the beginning). > > Does anyone have an idea to swap the base strings and keep the > translations? > > My script is capable of inserting the new base strings in already > translated po-files, but I can?t upload them to Zapata anyways. > > Leo > > _______________________________________________ > zanata-users mailing list > zanata-users at redhat.com > https://www.redhat.com/mailman/listinfo/zanata-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bkearney at redhat.com Fri Nov 16 16:00:34 2018 From: bkearney at redhat.com (Bryan Kearney) Date: Fri, 16 Nov 2018 11:00:34 -0500 Subject: [zanata-users] Changing base strings In-Reply-To: <2b3baa68-54f5-45c9-a062-d5c4dc98caaf@Spark> References: <039005E5-E234-44F8-81F1-BEA56254B3C8@kreissig.de> <2b3baa68-54f5-45c9-a062-d5c4dc98caaf@Spark> Message-ID: <6517da1f-364b-6aa5-d159-2db75d71c66b@redhat.com> If you have scripts to fix the pot and po files, then do the needful on your machine and then push the source and trnaslations back to the server: zanata push --push-type both -- bk On 11/16/18 9:59 AM, leonhard at kreissig.de wrote: > Anyone? > > Leo > Am 14. Nov. 2018, 16:19 +0100 schrieb Leonhard Kreissig > : >> Heyho, >> >> I?m currently maintaining a project that contains many faulty base >> strings (in English). >> I?ve set up a new translation to English where native speakers >> corrected the strings. >> >> Now I want to swap the strings so in case my i18n tools fail there are >> correct strings and so ?real? translators for other languages have a >> good base to work upon. >> >> My project uses gettext, so .po/.pot format. >> >> I?ve written a script that moves the corrected msgstr?s to the msgid >> field and the faulty msgid?s to previous_msgid. I hoped Zapata would >> recognize that and keep all the translations (The translators would be >> really really angry if they had to start from the beginning). >> >> Does anyone have an idea to swap the base strings and keep the >> translations? >> >> My script is capable of inserting the new base strings in already >> translated po-files, but I can?t upload them to Zapata anyways. >> >> Leo > > _______________________________________________ > zanata-users mailing list > zanata-users at redhat.com > https://www.redhat.com/mailman/listinfo/zanata-users > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From leonhard at kreissig.de Fri Nov 16 16:49:38 2018 From: leonhard at kreissig.de (leonhard at kreissig.de) Date: Fri, 16 Nov 2018 17:49:38 +0100 Subject: [zanata-users] Changing base strings In-Reply-To: <6517da1f-364b-6aa5-d159-2db75d71c66b@redhat.com> References: <039005E5-E234-44F8-81F1-BEA56254B3C8@kreissig.de> <2b3baa68-54f5-45c9-a062-d5c4dc98caaf@Spark> <6517da1f-364b-6aa5-d159-2db75d71c66b@redhat.com> Message-ID: Hey, thanks for your responses. That?s what my script originally meant to do: Match the translations and generate a po from them. But as good as the plan was the bad it worked: I don?t know if I?m blind or not, but I couldn?t find any way to upload po's containing translations to zanata, only pot's Leo /// Leonhard Krei?ig Bergstr. 6 45219 Essen Tel.: (02054) 87 55 407 Mobil: 0151 62 90 29 89 Am 16. Nov. 2018, 17:00 +0100 schrieb Bryan Kearney : > If you have scripts to fix the pot and po files, then do the needful on > your machine and then push the source and trnaslations back to the server: > > zanata push --push-type both > > -- bk > > On 11/16/18 9:59 AM, leonhard at kreissig.de wrote: > > Anyone? > > > > Leo > > Am 14. Nov. 2018, 16:19 +0100 schrieb Leonhard Kreissig > > : > > > Heyho, > > > > > > I?m currently maintaining a project that contains many faulty base > > > strings (in English). > > > I?ve set up a new translation to English where native speakers > > > corrected the strings. > > > > > > Now I want to swap the strings so in case my i18n tools fail there are > > > correct strings and so ?real? translators for other languages have a > > > good base to work upon. > > > > > > My project uses gettext, so .po/.pot format. > > > > > > I?ve written a script that moves the corrected msgstr?s to the msgid > > > field and the faulty msgid?s to previous_msgid. I hoped Zapata would > > > recognize that and keep all the translations (The translators would be > > > really really angry if they had to start from the beginning). > > > > > > Does anyone have an idea to swap the base strings and keep the > > > translations? > > > > > > My script is capable of inserting the new base strings in already > > > translated po-files, but I can?t upload them to Zapata anyways. > > > > > > Leo > > > > _______________________________________________ > > zanata-users mailing list > > zanata-users at redhat.com > > https://www.redhat.com/mailman/listinfo/zanata-users > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ianyrchoi at gmail.com Fri Nov 16 17:19:21 2018 From: ianyrchoi at gmail.com (Ian Y. Choi) Date: Sat, 17 Nov 2018 02:19:21 +0900 Subject: [zanata-users] Changing base strings In-Reply-To: References: <039005E5-E234-44F8-81F1-BEA56254B3C8@kreissig.de> <2b3baa68-54f5-45c9-a062-d5c4dc98caaf@Spark> <6517da1f-364b-6aa5-d159-2db75d71c66b@redhat.com> Message-ID: <2957ac3b-c37e-b0de-c4a3-2e239a4dd8b9@gmail.com> Hello, Not pretty sure since I have never tried, but I think the following way would work if you don't want to keep track of history on source string changes: - 1. Download both pot and po files ?(or download po files, and generate pot files from po files - e.g., https://stackoverflow.com/questions/5938869/how-to-generate-a-new-pot-template-from-a-translated-po-file ) - 2. Change both of source strings in pot and po files - 3. Upload a changed pot files to update source strings in Zanata - 4. Upload a changed po files to reflect translated strings with different source strings in Zanata Source & translation document upload should be fine. Please see http://docs.zanata.org/en/release/client/commands/push/ for more details. With many thanks, /Ian leonhard at kreissig.de wrote on 11/17/2018 1:49 AM: > Hey, thanks for your responses. > > That?s what my script originally meant to do: Match the translations > and generate a po from them. But as good as the plan was the bad it > worked: I don?t know if I?m blind or not, but I couldn?t find any way > to upload po's containing translations to zanata, only pot's > > Leo > > /// > > Leonhard Krei?ig > > Bergstr. 6 > 45219 Essen > > Tel.: (02054) 87 55 407 > Mobil: 0151 62 90 29 89 > Am 16. Nov. 2018, 17:00 +0100 schrieb Bryan Kearney : >> If you have scripts to fix the pot and po files, then do the needful on >> your machine and then push the source and trnaslations back to the >> server: >> >> zanata push --push-type both >> >> -- bk >> >> On 11/16/18 9:59 AM, leonhard at kreissig.de wrote: >>> Anyone? >>> >>> Leo >>> Am 14. Nov. 2018, 16:19 +0100 schrieb Leonhard Kreissig >>> : >>>> Heyho, >>>> >>>> I?m currently maintaining a project that contains many faulty base >>>> strings (in English). >>>> I?ve set up a new translation to English where native speakers >>>> corrected the strings. >>>> >>>> Now I want to swap the strings so in case my i18n tools fail there are >>>> correct strings and so ?real? translators for other languages have a >>>> good base to work upon. >>>> >>>> My project uses gettext, so .po/.pot format. >>>> >>>> I?ve written a script that moves the corrected msgstr?s to the msgid >>>> field and the faulty msgid?s to previous_msgid. I hoped Zapata would >>>> recognize that and keep all the translations (The translators would be >>>> really really angry if they had to start from the beginning). >>>> >>>> Does anyone have an idea to swap the base strings and keep the >>>> translations? >>>> >>>> My script is capable of inserting the new base strings in already >>>> translated po-files, but I can?t upload them to Zapata anyways. >>>> >>>> Leo >>> >>> _______________________________________________ >>> zanata-users mailing list >>> zanata-users at redhat.com >>> https://www.redhat.com/mailman/listinfo/zanata-users >>> >> >> > > _______________________________________________ > zanata-users mailing list > zanata-users at redhat.com > https://www.redhat.com/mailman/listinfo/zanata-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From camunoz at redhat.com Fri Nov 16 20:23:33 2018 From: camunoz at redhat.com (Carlos Munoz) Date: Fri, 16 Nov 2018 15:23:33 -0500 Subject: [zanata-users] Changing base strings In-Reply-To: References: <039005E5-E234-44F8-81F1-BEA56254B3C8@kreissig.de> <2b3baa68-54f5-45c9-a062-d5c4dc98caaf@Spark> <6517da1f-364b-6aa5-d159-2db75d71c66b@redhat.com> Message-ID: The Zanata cli has an option to only upload translations (i.e. po files) On Fri, Nov 16, 2018 at 12:42 PM wrote: > Hey, thanks for your responses. > > That?s what my script originally meant to do: Match the translations and > generate a po from them. But as good as the plan was the bad it worked: I > don?t know if I?m blind or not, but I couldn?t find any way to upload po's > containing translations to zanata, only pot's > > Leo > > /// > > Leonhard Krei?ig > > Bergstr. 6 > 45219 Essen > > Tel.: (02054) 87 55 407 <+4920548755407> > Mobil: 0151 62 90 29 89 <+4915162902989> > Am 16. Nov. 2018, 17:00 +0100 schrieb Bryan Kearney : > > If you have scripts to fix the pot and po files, then do the needful on > your machine and then push the source and trnaslations back to the server: > > zanata push --push-type both > > -- bk > > On 11/16/18 9:59 AM, leonhard at kreissig.de wrote: > > Anyone? > > Leo > Am 14. Nov. 2018, 16:19 +0100 schrieb Leonhard Kreissig > : > > Heyho, > > I?m currently maintaining a project that contains many faulty base > strings (in English). > I?ve set up a new translation to English where native speakers > corrected the strings. > > Now I want to swap the strings so in case my i18n tools fail there are > correct strings and so ?real? translators for other languages have a > good base to work upon. > > My project uses gettext, so .po/.pot format. > > I?ve written a script that moves the corrected msgstr?s to the msgid > field and the faulty msgid?s to previous_msgid. I hoped Zapata would > recognize that and keep all the translations (The translators would be > really really angry if they had to start from the beginning). > > Does anyone have an idea to swap the base strings and keep the > translations? > > My script is capable of inserting the new base strings in already > translated po-files, but I can?t upload them to Zapata anyways. > > Leo > > > _______________________________________________ > zanata-users mailing list > zanata-users at redhat.com > https://www.redhat.com/mailman/listinfo/zanata-users > > > > _______________________________________________ > zanata-users mailing list > zanata-users at redhat.com > https://www.redhat.com/mailman/listinfo/zanata-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonhard at kreissig.de Fri Nov 16 22:40:22 2018 From: leonhard at kreissig.de (leonhard at kreissig.de) Date: Fri, 16 Nov 2018 23:40:22 +0100 Subject: [zanata-users] Changing base strings In-Reply-To: <2957ac3b-c37e-b0de-c4a3-2e239a4dd8b9@gmail.com> References: <039005E5-E234-44F8-81F1-BEA56254B3C8@kreissig.de> <2b3baa68-54f5-45c9-a062-d5c4dc98caaf@Spark> <6517da1f-364b-6aa5-d159-2db75d71c66b@redhat.com> <2957ac3b-c37e-b0de-c4a3-2e239a4dd8b9@gmail.com> Message-ID: <4afc7b6b-3816-4e1d-8114-379b68edab8a@Spark> Ian, You?re my hero! I never thought of the cli as a way to do this ? Thanks everyone! Leo Am 16. Nov. 2018, 18:19 +0100 schrieb Ian Y. Choi : > Hello, > > Not pretty sure since I have never tried, but I think the following way would work if you don't want to keep track of history on source string changes: > > - 1. Download both pot and po files > ?(or download po files, and generate pot files from po files - e.g., https://stackoverflow.com/questions/5938869/how-to-generate-a-new-pot-template-from-a-translated-po-file ) > - 2. Change both of source strings in pot and po files > - 3. Upload a changed pot files to update source strings in Zanata > - 4. Upload a changed po files to reflect translated strings with different source strings in Zanata > > Source & translation document upload should be fine. > Please see http://docs.zanata.org/en/release/client/commands/push/ for more details. > > > With many thanks, > > /Ian > > leonhard at kreissig.de wrote on 11/17/2018 1:49 AM: > > Hey, thanks for your responses. > > > > That?s what my script originally meant to do: Match the translations and generate a po from them. But as good as the plan was the bad it worked: I don?t know if I?m blind or not, but I couldn?t find any way to upload po's containing translations to zanata, only pot's > > > > Leo > > > > /// > > > > Leonhard Krei?ig > > > > Bergstr. 6 > > 45219 Essen > > > > Tel.: (02054) 87 55 407 > > Mobil: 0151 62 90 29 89 > > Am 16. Nov. 2018, 17:00 +0100 schrieb Bryan Kearney : > > > If you have scripts to fix the pot and po files, then do the needful on > > > your machine and then push the source and trnaslations back to the server: > > > > > > zanata push --push-type both > > > > > > -- bk > > > > > > On 11/16/18 9:59 AM, leonhard at kreissig.de wrote: > > > > Anyone? > > > > > > > > Leo > > > > Am 14. Nov. 2018, 16:19 +0100 schrieb Leonhard Kreissig > > > > : > > > > > Heyho, > > > > > > > > > > I?m currently maintaining a project that contains many faulty base > > > > > strings (in English). > > > > > I?ve set up a new translation to English where native speakers > > > > > corrected the strings. > > > > > > > > > > Now I want to swap the strings so in case my i18n tools fail there are > > > > > correct strings and so ?real? translators for other languages have a > > > > > good base to work upon. > > > > > > > > > > My project uses gettext, so .po/.pot format. > > > > > > > > > > I?ve written a script that moves the corrected msgstr?s to the msgid > > > > > field and the faulty msgid?s to previous_msgid. I hoped Zapata would > > > > > recognize that and keep all the translations (The translators would be > > > > > really really angry if they had to start from the beginning). > > > > > > > > > > Does anyone have an idea to swap the base strings and keep the > > > > > translations? > > > > > > > > > > My script is capable of inserting the new base strings in already > > > > > translated po-files, but I can?t upload them to Zapata anyways. > > > > > > > > > > Leo > > > > > > > > _______________________________________________ > > > > zanata-users mailing list > > > > zanata-users at redhat.com > > > > https://www.redhat.com/mailman/listinfo/zanata-users > > > > > > > > > > > > > > _______________________________________________ > > zanata-users mailing list > > zanata-users at redhat.com > > https://www.redhat.com/mailman/listinfo/zanata-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: