Skip to content

Update UI for SD log period settings#3058

Merged
pfeerick merged 13 commits intoEdgeTX:mainfrom
mha1:DisplayLogPeriodZeroAsOFF
Jan 27, 2023
Merged

Update UI for SD log period settings#3058
pfeerick merged 13 commits intoEdgeTX:mainfrom
mha1:DisplayLogPeriodZeroAsOFF

Conversation

@mha1
Copy link
Contributor

@mha1 mha1 commented Jan 18, 2023

fixes #2965

Changes:

  • the log period range is now 0.1s to 25.5s
  • upon creation of a new SD Logs SF the period is initialized to 1.0s
  • text "Value" is changed to "Interval" to indicate parameter represents the log period
  • text "Switch" is changed to "Trigger"

image

@Eldenroot
Copy link
Contributor

Please ping all translators

@mha1
Copy link
Contributor Author

mha1 commented Jan 18, 2023

Please ping all translators

how best to do this?

@Eldenroot
Copy link
Contributor

Eldenroot commented Jan 18, 2023

I am not at home right now, maybe @HThuren could you please ping all of lang maintainers? Thank you

@HThuren
Copy link
Contributor

HThuren commented Jan 18, 2023

I am not at home right now, maybe @HThuren could you please ping all of lang maintainers? Thank you

I ping them.

@HThuren
Copy link
Contributor

HThuren commented Jan 18, 2023

Hi translators,

Maybe you want to translate "Period" in your language file, please.

@mha1
Copy link
Contributor Author

mha1 commented Jan 18, 2023

Hi translators,

@ParkerEde / @TheIsotopes DE @gagarinlg / @Eldenroot CZ @ulfhedlund SE @robustini IT @zyren CN / TW @ajjjjjjjj PL @ToshihiroMakuuchi JP

Maybe you want to translate "Period" in your language file, please.

@HThuren they don't have the word. It's new with this PR

@HThuren
Copy link
Contributor

HThuren commented Jan 18, 2023

Translate -
#define TR_PERIOD "Period"

@gagarinlg
Copy link
Member

Wouldn't be "interval" a better choice than period?

@HThuren
Copy link
Contributor

HThuren commented Jan 18, 2023

Wouldn't be "interval" a better choice than period?

New define ?
#define TR_INTERVAL "Interval"

@mha1 what do you think ?

@mha1
Copy link
Contributor Author

mha1 commented Jan 18, 2023

Oxford dictionary definition of interval:
1.
an intervening time.
"after his departure, there was an interval of many years without any meetings"

a pause or break in activity.
"an interval of mourning"

Oxford dictionary definition of period:
2.
PHYSICS
the interval of time between successive occurrences of the same state in an oscillatory or cyclic phenomenon, such as a mechanical vibration, an alternating current, a variable star, or an electromagnetic wave.

@HThuren
Copy link
Contributor

HThuren commented Jan 18, 2023

I think you decide, translate wanted for
#define TR_PERIOD "Period"

@mha1
Copy link
Contributor Author

mha1 commented Jan 18, 2023

@HThuren Thanks for your support. How do you want to do this? Wait for the merge and then have individual PR's? Post translations here and me doing further commits?

@HThuren
Copy link
Contributor

HThuren commented Jan 19, 2023

@HThuren Thanks for your support. How do you want to do this? Wait for the merge and then have individual PR's? Post translations here and me doing further commits?

When this only are one define, I think the simplest way are to have them here from the translators, and you merge in own branch. The way with PR in your fork/branch are - i think - too much in this case.
No long wait, translators are very active :-)

@HThuren
Copy link
Contributor

HThuren commented Jan 19, 2023

Hi translators, (maybe there where som confusion)

@ParkerEde / @TheIsotopes DE
@gagarinlg / @Eldenroot CZ
@ulfhedlund SE
@robustini IT
@zyren CN / TW
@ajjjjjjjj PL
@ToshihiroMakuuchi JP

Maybe you want to translate "Period" in your language file, please.
Provide in this thread your translation of:

#define TR_PERIOD "Period"

@pfeerick
Copy link
Member

When we can, we're trying to include translations as part of main PR. And just to add to the confusion on period vs interval :-P

IMO interval is indeed the more correct - period describes the entire time, rather than the time between samples. Hence the use of "period" in when defining interval ;)

image

image

@HThuren
Copy link
Contributor

HThuren commented Jan 19, 2023

Why dont we make both defines, and the discussion will be which one to choose by programmer.
#define TR_PERIOD "Period"
#define TR_INTERVAL "Interval"

@pfeerick
Copy link
Member

Sounds good... the unused one now will probably get used in the future anyway.

@HThuren
Copy link
Contributor

HThuren commented Jan 19, 2023

DK translation
#define TR_PERIOD "periode"
#define TR_INTERVAL "interval"

@pfeerick pfeerick added enhancement ✨ New feature or request color Related generally to color LCD radios labels Jan 19, 2023
@pfeerick pfeerick added this to the 2.9 milestone Jan 19, 2023
@mha1
Copy link
Contributor Author

mha1 commented Jan 19, 2023

@pfeerick We really should use frequency in Hz but we would end up with kinda small values :-).

https://www.mathsisfun.com/algebra/amplitude-period-frequency-phase-shift.html
https://en.m.wikipedia.org/wiki/Frequency

I'm ok with whatever you choose.

@mha1
Copy link
Contributor Author

mha1 commented Jan 19, 2023

DK translation
#define TR_PERIOD "periode"
#define TR_INTERVAL "interval"

@HThuren is it ok to start with a lower case letter?

@HThuren
Copy link
Contributor

HThuren commented Jan 19, 2023

DK translation
#define TR_PERIOD "periode"
#define TR_INTERVAL "interval"

@HThuren is it ok to start with a lower case letter?

arhg, no both must have capital first letter.
#define TR_PERIOD "Periode"
#define TR_INTERVAL "Interval"

@ajjjjjjjj
Copy link
Contributor

PL

#define TR_PERIOD "Okres"
#define TR_INTERVAL "Interwał"

@MicheleVilla
Copy link
Contributor

MicheleVilla commented Jan 19, 2023

IT Italian translation

#define TR_PERIOD "Periodo"
#define TR_INTERVAL "Intervallo"

@TheIsotopes
Copy link
Contributor

DE

#define TR_PERIOD "Zeitraum"
#define TR_INTERVAL "Intervall"

@mha1
Copy link
Contributor Author

mha1 commented Jan 19, 2023

@ParkerEde @TheIsotopes

I am very sure the German word for period is Periode.

Studyflix:
"Um die Frequenz zu berechnen, wird der Kehrwert der Periode T genutzt, also f = 1/T"

@TheIsotopes
Copy link
Contributor

TheIsotopes commented Jan 19, 2023

@mha1

imo Zeitraum is more comfortable than Periode.

Floskel / Phrase:
"In einem Zeitraum von 0,5 sekunden ..."

Just think of the women. ;-)

@ParkerEde What's your opinion?

mha1 added 3 commits January 23, 2023 14:17
- minimum log interval 0.1s
- maximum log interval 25.5s
- default log interval 1.0s

TX12_Sim and X9D_Sim tested ok
@mha1 mha1 force-pushed the DisplayLogPeriodZeroAsOFF branch from dd3d768 to 8664308 Compare January 23, 2023 13:18
@mha1
Copy link
Contributor Author

mha1 commented Jan 23, 2023

@philmoz SF page looks great.
@pfeerick I think migration was successful so I'd like to call it a day here.
@ulfhedlund @HThuren Any further updates to translations should be done via PR #3082

Thanks for the great collaboration to Y'all

SF

@HThuren
Copy link
Contributor

HThuren commented Jan 23, 2023

Hi @mha1, after - as agreed - compiled all language DA EN DE CZ SE IT CN TW PL JP, all compile the radio part, but TW.
(I only compile FrSky X10s)

@mha1
Copy link
Contributor Author

mha1 commented Jan 23, 2023

you mean tw is broken?

@HThuren
Copy link
Contributor

HThuren commented Jan 23, 2023

you mean tw is broken?

right,
TR_SF_SWITCH and TR_PERIOD are missing in tw.h

@mha1
Copy link
Contributor Author

mha1 commented Jan 23, 2023

Thanks, I'll fix it.

@mha1
Copy link
Contributor Author

mha1 commented Jan 23, 2023

@HThuren I updated tw.h. Please try again.

@mha1 mha1 closed this Jan 23, 2023
@mha1 mha1 reopened this Jan 23, 2023
@HThuren
Copy link
Contributor

HThuren commented Jan 23, 2023

@HThuren I updated tw.h. Please try again.

I do it now

@HThuren
Copy link
Contributor

HThuren commented Jan 23, 2023

Well done, TW now compile for radio (and companion)
@zyren you maybe want to translate #define TR_PERIOD "Period" and #define TR_INTERVAL "Interval" in PR #3082

@mha1
Copy link
Contributor Author

mha1 commented Jan 23, 2023

@HThuren Awesome, thank you very much for going through all languages. I think we covered all bases now.

@HThuren
Copy link
Contributor

HThuren commented Jan 23, 2023

@mha1 , try to update one of the files to restart the automatic check (only way I know of to do this)

@pfeerick pfeerick self-assigned this Jan 26, 2023
@pfeerick
Copy link
Member

pfeerick commented Jan 27, 2023

One minor change - to always use STR_SF_SWITCH for the sf switch text - i.e. it will always be Trigger regardless of the SF, unless the wording is changed later...

@pfeerick pfeerick merged commit c739842 into EdgeTX:main Jan 27, 2023
@mha1
Copy link
Contributor Author

mha1 commented Jan 27, 2023

@pfeerick Thanks for merging this. To remove the logic to switch between STR_SWITCH and STR_SF_SWITCH entirely you can delete the line StaticText *sfSwitchText = nullptr; and change sfSwitchText = new StaticText(line, rect_t{}, STR_SF_SWITCH, 0, COLOR_THEME_PRIMARY1); to new StaticText(line, rect_t{}, STR_SF_SWITCH, 0, COLOR_THEME_PRIMARY1);

@pfeerick
Copy link
Member

Good point, thanks... I'll do that now before I forget as I don't think it will need to change dynamically just yet 😆

pfeerick added a commit that referenced this pull request Jan 27, 2023
mha1 added a commit to mha1/edgetx that referenced this pull request Jan 27, 2023
* fixes EdgeTX#2965

Changes:
- the log period range is now 0.1s to 25.5s
- upon creation of a new SD Logs SF the period is initialized to 1.0s
- text "Value" is changed to "Period" to indicate parameter represents the log period

ToDo:
- translations for "Period" if desired

rebase due to EdgeTX#2992

* changed Period to Interval

Added translations for DA, DE, EN, IT, PL

* added defaults for TR_INTERVAL to language files

* fixed problem with too many leading zeros for intervals less than 1s.

before: 00.5s
after: 0.5s

* added CZ translations for TR_PERIOD and TR_INTERVAL

changed EN TR_FUNC from "Func" to "Function"

* updated TR_FUNC for CZ, DA, IT, JP, PL

updated TR_PERIOD and TR_INTERVAL for JP

* added TR_PERIOD,  TR_INTERVAL, TR_FUNC for SE

* implemented TR_SF_SWITCH and logic to change between TR_SWITCH and TR_SF_SWITCH

* 212x64 radios: single source for #define TR_LSW_HEADERS in language files

deleted redundant defines

* changed 128x64 and 212x64 SF SD Logs to same logic as colorlcd with

- minimum log interval 0.1s
- maximum log interval 25.5s
- default log interval 1.0s

TX12_Sim and X9D_Sim tested ok

* migrated functional changes due to PR EdgeTX#2992

* missed updating TW language file

* fix: Always `STR_SF_SWITCH` regardless of SF

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
mha1 pushed a commit to mha1/edgetx that referenced this pull request Jan 27, 2023
@zyren
Copy link
Contributor

zyren commented Jan 30, 2023


CN
#define TR_PERIOD "周期"
#define TR_INTERVAL "间隔"



TW
#define TR_PERIOD "週期"
#define TR_INTERVAL "間隔"


@mha1 mha1 deleted the DisplayLogPeriodZeroAsOFF branch July 6, 2023 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

color Related generally to color LCD radios enhancement ✨ New feature or request translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Special Function "SD Logs" time value 0.0 does not create any log entries.