From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.help Subject: Re: Emacs as a translator's tool Date: Fri, 18 Sep 2020 22:02:24 +0200 Message-ID: References: <871rn35lqc.fsf@mbork.pl> <87zh9r45ad.fsf@mbork.pl> <87h7vz2m5g.fsf@ebih.ebihd> <87zh9qr67n.fsf@ericabrahamsen.net> <3DBA2692-28A0-4AC3-B884-78763A9C7B16@traduction-libre.org> <87tuzyr474.fsf@ericabrahamsen.net> <87h7rwtov7.fsf@ericabrahamsen.net> <87d02ktmpr.fsf@ericabrahamsen.net> <875z8c8din.fsf@ericabrahamsen.net> <87d02inbrn.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31748"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs To: Eric Abrahamsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 18 22:03:57 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJMbs-00089P-TG for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Sep 2020 22:03:57 +0200 Original-Received: from localhost ([::1]:35792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJMbr-0002ia-MP for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Sep 2020 16:03:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJMaa-0002fc-5P for help-gnu-emacs@gnu.org; Fri, 18 Sep 2020 16:02:38 -0400 Original-Received: from mail-oln040092075064.outbound.protection.outlook.com ([40.92.75.64]:26176 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJMaV-0000We-0k for help-gnu-emacs@gnu.org; Fri, 18 Sep 2020 16:02:35 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IQPcoivL/RLC/rw0Y5F7wKV+AgiIXvgzvaoKcZCK53/xqDfbp+VxLbXqo1w37Q/MIFYFP+ICoAA0zHkTE8rfUOUq7+nAnHNgvUKFAJtvf4qdk5ZxKn7XxUU0HfOE7Z/IfD7oI73HjK9uRPgQp1ifVNsCRJohQy39NLNZkymmSPeY1N0t/aymodyWlU4ve7iJz/omgJ7Np7USXsE+SP2bw5SBwT6ns4bpNuksYl99kX0Rcjx2fNmQHiCCpNI1s1S1cTQ0MdELBYM697GhdDs3Nz13DR38qbrWlYxUWn2XSpL3yq5fDwXErMj8YjtH8ANuqJYjdT5V0prjeuHJTenSHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hMVGufKof7Th76CWgyhJOdQvvJ6Wy4OtaWsOeQhLDxQ=; b=Ligy2jaOLIvACqQH0CvIqGf7m/g3D0Wrjg6VdEjRNIutgo5anTGV6JxfmoQh+6ub03o3u8JDdpFFHafpEW/Qg1wcdS677e110rXTPqrZpm8X++YMyzNmIBq2LfCFUi/ASF/rxMP65Kxfe0e5dG1N7IVazBHRNzPFbnikrR4BotzHafgebdA5AQknWoVfixop2yoDuZkiNPRFBEaw3uB+dN4nAbtMhAvbibfFha0RQy1WacxsegVRWOjuNm+TcOgCqMHVMip4ik8doSExbvrz3ka5uRLaEnDQOMb6oAZyeO/yPaMIF89vFQPrsTVQ7ZbHSo1iLI1HBpSEsAR8MS3RYA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hMVGufKof7Th76CWgyhJOdQvvJ6Wy4OtaWsOeQhLDxQ=; b=ViJQZ1RfS700kl8IVy8o3lB2Ti/snHf6lwKrxfB/ZE/PotEuvcmp8KIDK8kDaPWl/GBkdQ/5KPj9hHGiqIDh5jUAfkAm0ITi9YSc2GSRjWIiKT+ZV3NBZVQsrrqGpyUkpKWdI74yDS6PgVeyHDhhLGsTpPJ6a2Fnaz2oht9o0JW0NHtwvVeQpKEIImYfwTF/YEEfoV8ZBBsRB2bHchYt2qoQlGts6mGoftIvV8xw1OjW6pYZpSl3IIUqQWwV1xEk9yRXm1X1+eKvsynhon2IYLU31Iex2Sk6CziOx3EVzE/PjLM+x/lS6pBRv4LLqM4Uwqt48SAkOZXeTM6UJ6ZEAQ== Original-Received: from VI1EUR04FT029.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0e::40) by VI1EUR04HT159.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0e::430) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Fri, 18 Sep 2020 20:02:26 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:7e0e::45) by VI1EUR04FT029.mail.protection.outlook.com (2a01:111:e400:7e0e::74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15 via Frontend Transport; Fri, 18 Sep 2020 20:02:26 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:34B7F12091D219655A29D43EAE37D749565ED2DBBCDBC217CE1E0A8E7852E97F; UpperCasedChecksum:670DF69E2B97945639D9A97A851CB925E3C037121325C0095BDF2A27082890BB; SizeAsReceived:9399; Count:48 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487]) by VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487%7]) with mapi id 15.20.3391.017; Fri, 18 Sep 2020 20:02:26 +0000 In-Reply-To: <87d02inbrn.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 18 Sep 2020 12:08:28 -0700") X-ClientProxiedBy: AM6P194CA0005.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:90::18) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <87sgbe7t0v.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6P194CA0005.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:90::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.11 via Frontend Transport; Fri, 18 Sep 2020 20:02:25 +0000 X-Microsoft-Original-Message-ID: <87sgbe7t0v.fsf@live.com> X-TMN: [9hDkT/OpuCf/bt00mZTTSgpo19EMPN6A] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: ace93128-37f0-4226-45ee-08d85c0dc360 X-MS-TrafficTypeDiagnostic: VI1EUR04HT159: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NWPMHrcUWAleOB1SVwbPfuWyeHe8yDDhJ4XViKJC0AavbM0ADuAlijrAe0qqFzeDxWlrk+6yfbZiZ9GiQ/+VbfMNEHM6ZepvQtQuoWZ1sDHgBHSYT9jjhuAy2hfceW8v1H0futwyoXM0pyMr3aNQ1m2eGgKOgVdulcXKw+UME7r1sfQhT1YbVyWUCB+oyArPgwx+qHjpkUVhMP3saIQ40w== X-MS-Exchange-AntiSpam-MessageData: W0D0qxXENVumxNoKgLszA0SHax9jwaUiB8pgO3XE+BjRYUt9XST+tAZPuz8o4wKbrLQgBos+iwdwLjWOfjixk5Petd0Gg25Szp+A9Ip9CDaQ0X3YL0W+uBnm35I/TSPi8KTdZwpthAvrgi2TgaeAYw== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: ace93128-37f0-4226-45ee-08d85c0dc360 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2020 20:02:25.9639 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: VI1EUR04FT029.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1EUR04HT159 Received-SPF: pass client-ip=40.92.75.64; envelope-from=arthur.miller@live.com; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 16:02:26 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124095 Archived-At: Eric Abrahamsen writes: > [Dropping other people off cc as they might not want to stick with a > pretty old thread] > > Arthur Miller writes: > >>> -------- Originalmeddelande -------- >>> Fr=C3=A5n: Eric Abrahamsen >>> Datum: 2020-09-17 20:27 (GMT+01:00) >>> Till: arthur miller >>> Kopia: Jean-Christophe Helary , >>> help-gnu-emacs , Emanuel Berg , Yuri >>> Khan >>> =C3=84mne: Re: Emacs as a translator's tool >>> >>> arthur miller writes: >>> >>>> Sure, no rush at all. By the way, the original source is a book in pdf= format. >>> >>> Ha, this package won't do much at all, then! The main point is having >>> source and translation together in the same buffer, and keeping >>> correspondences between locations and glossary items. If the source >>> isn't in Emacs at all, I don't think it will do much for you. >> >> Ok, text extracted fine; I am not sure how to use the tool yet; but at >> least I can repport that when I tried to enable org-translate-mode I got >> error: >> >> Symbol=E2=80=99s value as variable is void:org-export-filter-body-functi= ons >> >> That was solved by (require 'ox). I don't know if ox is supposed to be >> included by default or not, but seems to solve it. > > Oops, thanks, I'll add that. > >> After that mode started correctly (in my org file), and asked me if I >> wanted to index something: >> >> Project not yet segmented, segment now? (y or n) y >> You=E2=80=99re 0% done! >> >> I have downloaded the source file just few minutes ago, so I guess I >> have the latest version. >> >> Any pointer what to do next/how to use the tool? How should I setup the >> document so it can be used with the tool? How do I set the source file >> (extracted text), do I need to copy it manually or can I set it up as a >> file to be imported? >> >> Currently I try to follow the book layout as closely as possible, so I >> have a structure as this: >> >> * Chapter X >> ** p1 >> ** p2 >> ... >> ** pn >> *Chapyter Y >> ** pn+1 >> .... > > You can check the Commentary section of the file for the basics: right > now it expects three (at least) top-level Org headings, representing the > source text, translated text, and glossary. So you'd move your existing > translation under a new top-level heading, put the original source text > under a new top-level heading, and add a third top-level heading for the > glossary. > > How the package identifies which tree is which is very customizable, but > by default it looks for a ":source:" tag on the top heading of the > source tree, a ":translation:" tag on the top heading of the translation > tree, and a glossary where the heading text itself is just "Glossary". > > If you're doing a book, I would then set `ogt-segmentation-strategy' to > the symbol 'paragraph. Then turn on the minor mode, which should segment > the source text. I've updated the library to also segment the > translation text, which will be important to you since you've already > done so much of it. > > I'm sort of surprised that segmentation didn't error out before -- if > the code can't find a source tree, it should indicate an error. > > Then use "C-M-n" to start a new segment in the translation text, and > "C-M-f" and "C-M-b" to move between segments. Or move around however you > like, and then hit "C-M-t" to update the source window to show the > location corresponding to where you are. Ok, thank you very much for the help; I will try and see how it works for me, you clarified a lot, I wasn't really getting it from the comments. > It's early days for this library, so please be patient! Thanks for being > willing to test it. No worries; it is cool to test it. Since the book is in under the CC license. TBH I would like to set it up, maybe on Github, so someone else can help mo translate it from my pidgin-like English into "proper" English since I am not an English native speaker myself.