![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
Q about submitting fixes to crengine
I've fixed a problem with the 12/24 hour clock setting on crengine, which required change to the crengine C++ code. Is my understanding correct that you have to submit the change all of the way back to the upstream on SourceForge?
|
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,750
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Coolreader has migrated to GitHub (see https://github.com/buggins/coolreader) but you can also open a PR in https://github.com/koreader/crengine
The problem is just that we are or were at the top of the search results which led to some people thinking we were the coolreader. ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
Quote:
![]() Quote:
|
||
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
I'm a bit confused. The KOReader log says that it bumped the base crengine somewhat recently, but the code in the repo that you pointed me to is VERY different, and it seems that the 12hour clock option was removed. Given that the engine was bumped just a few days ago and the changes I'm seeing are much older than that, I must be looking in the wrong place.
|
![]() |
![]() |
![]() |
#5 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Where *were* you looking, in both cases?
I mean, the clock formatting option for *CRe* was only added two weeks ago: https://github.com/koreader/crengine...11c151db03d95b, and I'm not sure it's even landed upstream yet, so it's currently only available in KOReader nightlies. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
Quote:
[change]->[crengine]->bump->[koreader] Are you saying that there's cross pollination in both directions? That's the exact block of code that I was trying to change, but to make it more consistent w/ the formatting in KOReader: Code:
int const raw_hour = bt->tm_hour > 12 ? bt->tm_hour % 12 : bt->tm_hour; int const hour = raw_hour?raw_hour:12; sprintf(str, "%d:%02d %s", hour, bt->tm_min, raw_hour<12?"AM":"PM"); Code:
Improved 12 hour clock display The primary motivation of this improvement was to make the format more consistent with how 12 hour clocks are generally displayed, and consistent with how the other clocks are displayed when used within KOReader. * Made the midnight to 01:00 hour display 12 instead of 0 * Added an AM/PM indicator Last edited by twowheels; 02-12-2021 at 01:27 PM. |
|
![]() |
![]() |
![]() |
#7 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
We don't control CRe's upstream, we control *KOReader's* fork of CRe (what I linked to).
@poire-z often pulls upstream's CRe changes into our fork, and @virxkane often pulls our fork's changes into CRe's upstream ![]() So, when I say CRe, I usually mean our fork. In which case, it needs to be bumped in koreader-base, and base needs to be bumped in koreader for it to show up in nigthlies. |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
As far as your exact change, I can pretty confidently say that it'd be rejected, because it's not translatable.
And we can't really switch to strftime, because Windows is terrible (c.f., #410). (But, yes, our fork is where this should go to, especially since this probably hasn't landed upstream at all yet). Last edited by NiLuJe; 02-12-2021 at 01:33 PM. |
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
Good point on the l10n. I'll look into how that's handled, and if it's too much of a mess I'll just submit the 0 --> 12 part of the change as a smaller PR.
|
![]() |
![]() |
![]() |
#11 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
That said, you've got a couple of things going for you:
* We don't give much of a damn about 12 hour clocks * We give even less of a damn about CRe's header * The sane (e.g., strftime) approach requires compiled locales for the target language, and that's a non-starter on Kobo, because they don't compile *any* locales. So it'd effectively always show AM/PM anyways. I don't recall how well Kindles handle non-English locales on that front. * AFAIK, there aren't many languages that actually both prefer 12h clocks *and* have a localized variant, and I'm even less sure if we actually support any of those ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble with Submitting to Smashwords | Devaraj2 | Editor | 0 | 03-13-2017 06:23 AM |
CREngine shortcomings | eMole | KOReader | 3 | 09-04-2016 04:40 PM |
Workflow for making and submitting changes | Halo | Development | 9 | 09-17-2011 10:36 AM |
Submitting update to iBookstore | JCarig | Apple Devices | 3 | 06-24-2011 04:55 AM |
submitting a new ebook | bobcdy | Kindle Formats | 30 | 12-10-2009 04:32 AM |