delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/11/18/07:31:57

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Mailer: exmh version 2.7.2 01/07/2005 (debian 1:2.7.2-18) with nmh-1.3
X-Exmh-Isig-CompType: repl
X-Exmh-Isig-Folder: inbox
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Bug #903129 Translations don't work on Windows
In-reply-to: <20121116222416.4B63C81345FC@turkos.aspodata.se>
References: <20121113211401 DOT 20747813A49B AT turkos DOT aspodata DOT se> <CAOuGh89nhtaPkKZ+0CJGn9V_XnZyi6YD-NndT53FHoAyYD0LFw AT mail DOT gmail DOT com> <20121115210903 DOT 90A4881345E3 AT turkos DOT aspodata DOT se> <CAPYb0EE-xqA681-iq9AwnL7Wq1j9NL7AP383X5qe5QeCZZW0Ug AT mail DOT gmail DOT com> <20121116135510 DOT 6D56B81345EB AT turkos DOT aspodata DOT se> <CAOuGh8_tCu_CM=RCRPDAoJMObszqWpjG29-37rAUAHyBN18uSw AT mail DOT gmail DOT com> <20121116204345 DOT 9377B81345F9 AT turkos DOT aspodata DOT se> <CAOuGh88CA2c+HNu+9QqGZZ2oLSeNHq5bsgvcWDqhQ+5nB_aAbg AT mail DOT gmail DOT com> <20121116222416 DOT 4B63C81345FC AT turkos DOT aspodata DOT se>
Comments: In-reply-to karl AT aspodata DOT se (Karl Hammar)
message dated "Fri, 16 Nov 2012 23:24:16 +0100."
Mime-Version: 1.0
Message-Id: <20121118123027.272B08134615@turkos.aspodata.se>
Date: Sun, 18 Nov 2012 13:30:27 +0100 (CET)
From: karl AT aspodata DOT se (Karl Hammar)
X-Virus-Scanned: ClamAV using ClamSMTP
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

This is a multipart MIME message.

--==_Exmh_1353241545_25560
Content-Type: text/plain; charset="utf-8"

Karl Hammar:
> Bob Paddock:
> ... [ code to get full path of exe file ] ...
> > > If you have tested this, I'm fine with that also.
> > I tested on my Windows7 box here, worked as I expected it to.
> > Will test on my Windows8 system next week.
> > 
> > >  bin/gschem.exe
> > > ...
> > >  share/locale/...
> > > ...
> > >
> > > Can we trust that each and every geda installation in MS-Windows
> > > will have this directory structure?
> > 
> > For the moment.
> 
> Good, I'll see if I can come up with a test program tomorrow.

And tomorrow became today.
Bob, or anyone, could you test the attached program.

I have compiled it with:

$ gcc `pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0` Twin.c -o Twin
$ ./Twin 
localedir at <c:\gEDA\share\locale>
localedir at <c:\gEDA/share/locale>
$

I don't know how to compile it for MS-Windows.
Which version of get_locale() do you like, should we use?

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57


--==_Exmh_1353241545_25560
Content-Type: text/x-csrc ; name="Twin.c"
Content-Description: Twin.c
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Twin.c"

LyoKICogU2ltcGxlIGV4YW1wbGUgb2YgaG93IHRvIGZpbmQgdGhlIGxvY2F0aW9uIG9mIHJ1
bm5pbmcgLmV4ZSAodXMpLgogKgogKiBFeGFtcGxlIGRvZXMgbm90IGFjY291bnQgZm9yIGlz
c3VlcyBvZiBJbnRlcm5hbGl6YXRpb24gb2YgZmlsZQpuYW1lcy9maWxlIHN5c3RlbXMuCiAq
LwoKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxnbGliLmg+CgojaWZkZWYgX19saW51
eF9fCiNkZWZpbmUgTUFYX1BBVEggNDAwCnN0cnVjdCBISU5TVEFOQ0VfdCB7CiAgY29uc3Qg
Y2hhciAqZmlsZW5hbWU7Cn07CnR5cGVkZWYgc3RydWN0IEhJTlNUQU5DRV90ICpISU5TVEFO
Q0U7CgpISU5TVEFOQ0UgR2V0TW9kdWxlSGFuZGxlKHZva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
LCBNQVhfUEFUSCkpIHsKICAgICAgZnByaW50ZihzdGRlcnIsICJlcnJvclxuIik7CiAgICAg
IHJldHVybiAxOwogICAgfQogICAgcHJpbnRmKCJsb2NhbGVkaXIgYXQgPCVzPlxuIiwgbG9j
YWxlZGlyKTsKICB9CgogIHsgLy8gYWx0IDIKICAgIGNoYXIgKmxvY2FsZWRpciA9IGdldF9s
b2NhbGVkaXIyKCk7CiAgICBwcmludGYoImxvY2FsZWRpciBhdCA8JXM+XG4iLCBsb2NhbGVk
aXIpOwogIH0KfQo=
--==_Exmh_1353241545_25560--


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019