It is currently April 27th, 2024, 6:13 pm

Translate the greetings

General topics related to Rainmeter.
andrebourdages
Posts: 1
Joined: October 22nd, 2023, 2:15 pm
Location: Canada

Translate the greetings

Post by andrebourdages »

Hello,

I can't translate the greetings into French. Do we need a procedure at the beginning of the code to translate everything into French or do we have to translate each element such as days and dates individually?


Thanks!

0

Code: Select all

[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh] 
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]

[Variables]
@include=#@#Variables.inc
@include2=#@#Language\Language.inc
Scale=3.95

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureHours]
Measure=Time
Format=%#Format#:%M

[MeasureAmPm]
Measure=Time
Format=%p

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureTimeOfDay]
Measure=Time
Format=%H
Substitute=#TimeOfDay#

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureDate]
Measure=Time
Format=%A
IfMatch=Saturday|Sunday
IfMatchAction=[!SetOption MeterDayOfWeek Text "C'est la fin de semaine. C'est le temps de se reposer.]
IfNotMatchAction=[!SetOption MeterDayOfWeek Text "Une bonne journée de travail à la coopérative.]
IfMatchMode=1

;-------------------------------------------------------------
;-------------------------------------------------------------

[Meter24hClock]
Meter=String
MeasureName=MeasureHours
StringAlign=Left
FontFace=Comfortaa
FontColor=FFFFFF
FontSize=(20*#Scale#)
X=(5*#Scale#)
Y=(0*#Scale#)
Text=%1
AntiAlias=1
Hidden=#Hidden#

[Meter12hClock]
Meter=String
MeasureName=MeasureHours
MeasureName2=MeasureAmPm
StringAlign=Left
FontFace=Comfortaa
FontColor=FFFFFF
FontSize=(20*#Scale#)
X=(0*#Scale#)r
Y=(0*#Scale#)r
Text=%1%2
AntiAlias=1
InlinePattern=[MeasureAmPm]
InlineSetting=Size | (10*#Scale#)
DynamicVariables=1
Hidden=#Hidden2#

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterTimeOfDay]
Meter=String
MeasureName=MeasureTimeOfDay
StringAlign=Left
FontFace=Comfortaa
FontColor=FFFFFF
FontSize=(5*#Scale#)
X=(5*#Scale#)
Y=(35*#Scale#)
Text=%1, André
AntiAlias=1

[MeterDayOfWeek]
Meter=String
StringAlign=Left
FontFace=Comfortaa
FontColor=FFFFFF,100
FontSize=(3.2*#Scale#)
X=(5*#Scale#)
Y=(0*#Scale#)R
AntiAlias=1
Last edited by balala on October 22nd, 2023, 2:53 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting codes. It's the </> button.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Translate the greetings

Post by eclectic-tech »

Try adding the missing close quotation marks " to the end of your IfMatchAction/IfNotMatchAction bangs.

Code: Select all

IfMatch=Saturday|Sunday
IfMatchAction=[!SetOption MeterDayOfWeek Text "C'est la fin de semaine. C'est le temps de se reposer."]
IfNotMatchAction=[!SetOption MeterDayOfWeek Text "Une bonne journée de travail à la coopérative"]
IfMatchMode=1
User avatar
balala
Rainmeter Sage
Posts: 16178
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Translate the greetings

Post by balala »

andrebourdages wrote: October 22nd, 2023, 2:27 pm I can't translate the greetings into French. Do we need a procedure at the beginning of the code to translate everything into French or do we have to translate each element such as days and dates individually?
In addition to eclectic-tech's advice, what exactly would you like to translate? The string shown by the [MeterDayOfWeek] meter, which is set through the IfMatchAction and IfNotMatchAction options of the [MeasureDate] measure, are translated. I can't see what else should be translated. Am I missing something?

Additional note: it's completely useless to add the IfMatchMode=1 option to the [MeasureDate] measure. I'd remove it.