Re: [sword-devel] I give up

2020-05-15 Thread Greg Hellings
On Fri, May 15, 2020 at 4:43 PM Tom Sullivan  wrote:

> Y'all:
>
> I finally successfully brought up a Fedora VM.
>
> General warning: Do NOT install LXDE - it will trash your ability to
> highlight text or copy/paste. XFCE is fine.
>
> Anyway, I tried multiple times to compile and run:
> Sword - worked fine as a test - there is a current rpm.
>

Yes, I package 1.8.1 combined with a major patch from Jaak that changes all
the __u64 integers to std::uint64_t values, because Sword does not compile
on PPC64LE due to errors regarding the __u64 type definition. However,
std::uint64_t values are consistent across the types (i.e. Sword doesn't
attempt to redefine them). Thus, you have the latest release available in
Fedora.

Bibletime - could not compile - rpm is still version 2
>

2.11 is still the latest. 3.0 is still in RC/preview. Fedora discourages
shipping RPMs of RC/beta software unless it's a product (like GMail was for
years) that is a perpetual beta. So this RPM is still up to date. As soon
as 3.0 final lands, I'll build the RPMs for it.

Xiphos - Could compile, had to copy *.so in order to run, acted
> strangely and did not show all modules. - rpm is still version 4.1
>

Which *.so did you have to copy, from where to where? Also, 4.2.1 is in the
updates-testing repository. Fedora requires all package updates for a
released version (Fedora 31 or 32 is probably what you're running, based on
this) to land in an "updates-testing" repository for at least 7 days or
until it has been tested as working by at least 3 different people before
they get moved to the standard repositories. You can install the new
version by "dnf install --enablerepo=updates-testing xiphos" if you want to
give feedback on the new package. For something like Xiphos I rarely get
any test feedback, so it lands automatically 7 days after I issue the
build. So in 6-7 days you'll see 4.2.1 make it to the stable repo. It's
already in Rawhide (Fedora's analogue to Debian Testing), since that is not
a gated, stable release.


> This is NOT a call for assistance. I will await suitable rpm files from
> any source. Monkeying around with that which is over my head is a waste
> of everybody's time, mine and yours.
>

Sword and BibleTime is already at latest, and Xiphos can be pulled from
updates-testing as I mention above or you can wait < 1 week's time and
you'll have it as long as you're working on Fedora 31 or later. Thanks for
giving it a gander!

--Greg

>
> Many thanks.
>
> Tom
>
> Tom Sullivan
> i...@beforgiven.info
> FAX: 815-301-2835
> -
>
>
> On 5/14/20 4:06 AM, Dominique Corbex wrote:
> > On Wed, 13 May 2020 17:27:43 -0400
> > Tom Sullivan  wrote:
> >
> >> The repositories do not contain the latest versions. For example, the
> >> Debian Buster repository presents Xiphos 4.1, not the latest 4.2.
> >
> > I was a long time Debian user, I switched to Fedora for that reason.
> >
> > On Fedora, (many thanks to Greg) you have all the latest
> > frontend/backend software, and tools/bindings you need for building
> > your own modules and so on. Boring time spent trying to build
> > xiphos/sword/whateverelse from scratch is history.
> >
> > I don't have any regrets. IMHO Every serious Crosswire user should run
> > Fedora.
> >
> > Dom
> >
>
> ___
> sword-devel mailing list: sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] I give up

2020-05-15 Thread Tom Sullivan

Y'all:

I finally successfully brought up a Fedora VM.

General warning: Do NOT install LXDE - it will trash your ability to 
highlight text or copy/paste. XFCE is fine.


Anyway, I tried multiple times to compile and run:
Sword - worked fine as a test - there is a current rpm.
Bibletime - could not compile - rpm is still version 2
Xiphos - Could compile, had to copy *.so in order to run, acted 
strangely and did not show all modules. - rpm is still version 4.1


This is NOT a call for assistance. I will await suitable rpm files from 
any source. Monkeying around with that which is over my head is a waste 
of everybody's time, mine and yours.


Many thanks.

Tom

Tom Sullivan
i...@beforgiven.info
FAX: 815-301-2835
-


On 5/14/20 4:06 AM, Dominique Corbex wrote:

On Wed, 13 May 2020 17:27:43 -0400
Tom Sullivan  wrote:


The repositories do not contain the latest versions. For example, the
Debian Buster repository presents Xiphos 4.1, not the latest 4.2.


I was a long time Debian user, I switched to Fedora for that reason.

On Fedora, (many thanks to Greg) you have all the latest
frontend/backend software, and tools/bindings you need for building
your own modules and so on. Boring time spent trying to build
xiphos/sword/whateverelse from scratch is history.

I don't have any regrets. IMHO Every serious Crosswire user should run
Fedora.

Dom



___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] How to get translated book abbreviations with LocaleMgr?

2020-05-15 Thread Troy A. Griffitts
Sorry, I forgot to respond to this.

Yes, you can have a look at sword/tests/parsekey.cpp

But basically, while you can directly use LocaleMgr to translate any
strings, even strings in your application if you augment SWORD's
locale's with your application string with something like:

LocaleMgr::getSystemLocaleMgr()->loadConfigDir(SWBuf("~/.myapp/locales.d");

.. only the [Text] section is used directly for the translate method. 
E.g., if your application has some strings you'd like to add to SWORD's
translatable strings, for German, you might add a file:

# ~/.myapp/locales.d/de-utf8.conf
#

[Meta]
Name=de
Description=Deutsch (Unicode)
Encoding=UTF-8
Contributor=Justin Bellars 
Contributor=Ulrich Schmid 

[Text]
View=Abrufen
Bibles=Bibeln
Language Assist=Sprachförderung
Commentary Assist=Kommentarförderung
Verse Study=Vers-für-Vers-Analyse
Bookmarks=Lesezeichen

...

Any strings in this section will be available to LocaleMgr's translate
method, including all the ones that come default with SWORD.

The other sections (sections besides [Text] in SWORD's locale files are
not specifically for directly translation.  They are used by SWORD's
verse parser VerseKey translation, etc.

The typically way an app uses all this is (not usually all in one place
each time they want a translated book name, but for ordering purposes
all in one place...):

const char *usersPreferredLocaleName = "de"
const char *bookTerm = "Gen";
const char *activeBibleName = "KJVA";

LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(usersPreferredLocaleName);

SWMgr library;
SWModule *bible = library.getModule(activeBibleName);

VerseKey *vk = (VerseKey *)bible->getKey();
vk->setText(bookTerm);

std::string translatedAbbreviation = vk->getBookAbbrev();


In summery, usually a user's preferred locale is set systemwide.  Then
everything is generally switched to that locale, i.e., VerseKey output
will be in that locale so when you getBookAbbrev, you will get German.

You can do lower level work if you'd like.  SWKey has a setLocale method
if you'd like to set just a single key to a different language.  But
typically our frontends set default locale systemwide before
constructing SWMgr.

Hope this helps,

Troy



On 5/15/20 10:38 AM, Tobias Klein wrote:
>
> Hi Peter,
>
> Why is it then that mapping tables like this one are kept in the
> locales.d files:
>
> [Pref Abbrevs]
> Gen=1Mo
> Exod=2Mo
> Lev=3Mo
> Num=4Mo
> Deut=5Mo
> Josh=Jos
> Judg=Rich
> Ruth=Rut
> 1Sam=1Sam
> 2Sam=2Sam
> 1Kgs=1Kön
> 2Kgs=2Kön
> 1Chr=1Chr
> 2Chr=2Chr
> Ezra=Esr
> Neh=Neh
>
> This is the info I need. I'm just wondering how to extract that
> information with the SWORD API.
>
> Best regards,
> Tobias
>
> On 5/15/20 7:19 PM, Peter Von Kaehne wrote:
>>  
>> I think the lack of response is as there is no sensible way of
>> responding.
>>
>> The whole construct of abbreviations (irrespective of languages) is
>> uniderectional (Abbr->Book name). The same applies to English. What
>> you mix up here is that a particular subset of English abbreviations
>> is also the set of OSIS identifiers.
>>
>> Peter
>>  
>> *Gesendet:* Freitag, 15. Mai 2020 um 18:03 Uhr
>> *Von:* "Tobias Klein" 
>> *An:* "SWORD Developers' Collaboration Forum" 
>> *Betreff:* Re: [sword-devel] How to get translated book abbreviations
>> with LocaleMgr?
>> Hi,
>>  
>> Any feedback regarding this question?
>> I would appreciate it!
>>  
>> Best regards,
>> Tobias
>>  
>>
>> Am 10.05.2020 um 12:45 schrieb Tobias Klein > >:
>>  
>>
>> Hi,
>>
>> how can I use the LocaleMgr to get a translated book abbreviation?
>>
>> For some reason this code did not work for me:
>>
>> sword::SWLocale* locale = this->_localeMgr->getLocale(localeCode);
>> std::string translatedAbbreviation =
>> std::string(locale->translate(bookTerm));
>>
>> I was using "de" as a locale and "Gen" as the term to be
>> translated, but I did not get the german variant of "Gen", but
>> rather the exact same term "Gen" as a result.
>>
>> Best regards,
>> Tobias
>>
>> ___
>> sword-devel mailing list: sword-devel@crosswire.org
>> 
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>>
>> ___ sword-devel mailing
>> list: sword-devel@crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to
>> unsubscribe/change your settings at above page
>>
>> ___
>> sword-devel mailing list: sword-devel@crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
> ___
> sword-devel mailing list: sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> 

Re: [sword-devel] How to get translated book abbreviations with LocaleMgr?

2020-05-15 Thread Tobias Klein

Hi Peter,

Why is it then that mapping tables like this one are kept in the 
locales.d files:


[Pref Abbrevs]
Gen=1Mo
Exod=2Mo
Lev=3Mo
Num=4Mo
Deut=5Mo
Josh=Jos
Judg=Rich
Ruth=Rut
1Sam=1Sam
2Sam=2Sam
1Kgs=1Kön
2Kgs=2Kön
1Chr=1Chr
2Chr=2Chr
Ezra=Esr
Neh=Neh

This is the info I need. I'm just wondering how to extract that 
information with the SWORD API.


Best regards,
Tobias

On 5/15/20 7:19 PM, Peter Von Kaehne wrote:

I think the lack of response is as there is no sensible way of responding.

The whole construct of abbreviations (irrespective of languages) is 
uniderectional (Abbr->Book name). The same applies to English. What 
you mix up here is that a particular subset of English abbreviations 
is also the set of OSIS identifiers.


Peter
*Gesendet:* Freitag, 15. Mai 2020 um 18:03 Uhr
*Von:* "Tobias Klein" 
*An:* "SWORD Developers' Collaboration Forum" 
*Betreff:* Re: [sword-devel] How to get translated book abbreviations 
with LocaleMgr?

Hi,
Any feedback regarding this question?
I would appreciate it!
Best regards,
Tobias

Am 10.05.2020 um 12:45 schrieb Tobias Klein mailto:cont...@tklein.info>>:

Hi,

how can I use the LocaleMgr to get a translated book abbreviation?

For some reason this code did not work for me:

sword::SWLocale* locale = this->_localeMgr->getLocale(localeCode);
std::string translatedAbbreviation =
std::string(locale->translate(bookTerm));

I was using "de" as a locale and "Gen" as the term to be
translated, but I did not get the german variant of "Gen", but
rather the exact same term "Gen" as a result.

Best regards,
Tobias

___
sword-devel mailing list: sword-devel@crosswire.org

http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

___ sword-devel mailing 
list: sword-devel@crosswire.org 
http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to 
unsubscribe/change your settings at above page


___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] How to get translated book abbreviations with LocaleMgr?

2020-05-15 Thread Peter Von Kaehne
 


I think the lack of response is as there is no sensible way of responding.

The whole construct of abbreviations (irrespective of languages) is uniderectional (Abbr->Book name). The same applies to English. What you mix up here is that a particular subset of English abbreviations is also the set of OSIS identifiers.


Peter

 

Gesendet: Freitag, 15. Mai 2020 um 18:03 Uhr
Von: "Tobias Klein" 
An: "SWORD Developers' Collaboration Forum" 
Betreff: Re: [sword-devel] How to get translated book abbreviations with LocaleMgr?


Hi,
 

Any feedback regarding this question?

I would appreciate it!

 

Best regards,

Tobias
 

Am 10.05.2020 um 12:45 schrieb Tobias Klein :
 



Hi,

how can I use the LocaleMgr to get a translated book abbreviation?

For some reason this code did not work for me:


sword::SWLocale* locale = this->_localeMgr->getLocale(localeCode);

std::string translatedAbbreviation = std::string(locale->translate(bookTerm));


I was using "de" as a locale and "Gen" as the term to be translated, but I did not get the german variant of "Gen", but rather the exact same term "Gen" as a result.

Best regards,
Tobias

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page



___ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page





___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] How to get translated book abbreviations with LocaleMgr?

2020-05-15 Thread Tobias Klein
Hi,

Any feedback regarding this question?
I would appreciate it!

Best regards,
Tobias

> Am 10.05.2020 um 12:45 schrieb Tobias Klein :
> 
> Hi,
> 
> how can I use the LocaleMgr to get a translated book abbreviation?
> 
> For some reason this code did not work for me:
> 
> sword::SWLocale* locale = this->_localeMgr->getLocale(localeCode);
> std::string translatedAbbreviation = 
> std::string(locale->translate(bookTerm));
> I was using "de" as a locale and "Gen" as the term to be translated, but I 
> did not get the german variant of "Gen", but rather the exact same term "Gen" 
> as a result.
> 
> Best regards,
> Tobias
> 
> ___
> sword-devel mailing list: sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page