FET Forum

FET Development => Report a Bug => Topic started by: raducostea on May 16, 2018, 03:54:44 PM

Title: Fet Cli language
Post by: raducostea on May 16, 2018, 03:54:44 PM
Hello,

Running fet cli on MAC but the language attribute does not work
using: --language=ro it stills outputs everything in english.

Version
FET version 5.35.2
Free timetabling software, licensed under the GNU Affero General Public License version 3 or later
Copyright (C) 2002-2018 Liviu Lalescu, Volker Dirr
Homepage: https://lalescu.ro/liviu/fet/


Thanks,
Radu
Title: Re: Fet Cli language
Post by: Liviu Lalescu on May 16, 2018, 04:10:22 PM
You are missing the fet_ro.qm file. You need to put it in one of the three locations as below. I will write what I get if I am missing this file, versus what I get with fet_ro.qm present (I have GNU/Linux):


~/tt> ./fet-cl --inputfile=2006-2007.fet --language=ro
Title: FET warning
Message: Translation for specified language not loaded - maybe the translation file is missing - setting the language to en_US (US English)

FET searched for the translation file fet_ro.qm in the directory /home/goghi/tt, then in the directory /home/goghi/tt/translations and then in the directory /usr/share/fet/translations (under systems that support such a directory), but could not find it.

Starting timetable generation...
Total searching time (seconds): 0
Simulation successful
~/tt> mc

~/t> ./fet-cl --inputfile=2006-2007.fet --language=ro
Starting timetable generation...
Total searching time (seconds): 0
Simulation successful


I do not know exactly how it works on Mac OS X, I will ask Darren (Mac version provider) to take a look at this topic. I think that his fet-cl executable does not incorporate the .qm translation files.

Please let me know.
Title: Re: Fet Cli language
Post by: raducostea on May 16, 2018, 04:20:46 PM
Now it works, thanks!

Another offtopic question. With fet-cl is there a way to get the number of constraints that were not met? Like a resume?
Title: Re: Fet Cli language
Post by: Liviu Lalescu on May 16, 2018, 04:44:00 PM
Quote from: raducostea on May 16, 2018, 04:20:46 PM
With fet-cl is there a way to get the number of constraints that were not met? Like a resume?

I am not sure I understand correctly, but I think the answer is 'No'. You can only send the process the "SIGTERM" signal and it will output the current and the highest-stage timetables (two timetables).

Not even in the FET GUI you don't have a resume function, nor an indication of the constraints which were impossible to respect. You can only get the list of activities, in order.

Or, if you mean that right before the generation starts FET GUI will show you if there are some impossible constraints, then fet-cl will show you the same, but you need to observe the command-line interface for these messages from fet-cl.

Let me know if this answers your questions.

I am interested, how are you using fet-cl? You can give more details here or maybe in another topic.
Title: Re: Fet Cli language
Post by: Volker Dirr on May 16, 2018, 06:39:10 PM
hmmm... reading this is wonder if the output the the terminal must change the language also.

Title: Re: Fet Cli language
Post by: Liviu Lalescu on May 16, 2018, 06:49:40 PM
Quote from: Volker Dirr on May 16, 2018, 06:39:10 PM
hmmm... reading this is wonder if the output the the terminal must change the language also.

There are very minor general strings which really don't deserve being translated. On the other hand, we need a unified command-line usage.
Title: Re: Fet Cli language
Post by: Volker Dirr on May 16, 2018, 07:00:48 PM
oh.. yes, keep it untranslated, because:
- many other programs don't translate in the terminal
- program names are also normally English only
- if we translate the output it will be logical to translate in input parameters also; but that will be complicated to code
Title: Re: Fet Cli language
Post by: rodolforg on May 17, 2018, 03:48:15 AM
Quote from: Liviu Lalescu on May 16, 2018, 04:44:00 PM
Quote from: raducostea on May 16, 2018, 04:20:46 PM
With fet-cl is there a way to get the number of constraints that were not met? Like a resume?

I am not sure I understand correctly, but I think the answer is 'No'. You can only send the process the "SIGTERM" signal and it will output the current and the highest-stage timetables (two timetables).

Hmm... I think he could mean "summary"/"résumé" not "resume", a "false friend" for romance language speakers, like Portuguese, Spanish and French.
Title: Re: Fet Cli language
Post by: Liviu Lalescu on May 17, 2018, 07:01:49 AM
Quote from: rodolforg on May 17, 2018, 03:48:15 AM
Hmm... I think he could mean "summary"/"résumé" not "resume", a "false friend" for romance language speakers, like Portuguese, Spanish and French.

Oh, indeed :)

Isn't soft_conflicts.txt what you need, in this case?
Title: Re: Fet Cli language
Post by: raducostea on May 22, 2018, 01:54:17 PM
Quote from: Liviu Lalescu on May 17, 2018, 07:01:49 AM

Oh, indeed :)

Isn't soft_conflicts.txt what you need, in this case?

Yes, that looks something i can use.

Another question :)

Is there a terminate signal i can send to the PID to end the execution and write the highest simulation and highest csv simulation?

Right now if i use ctrl+c in the middle of it, no file are written.
Title: Re: Fet Cli language
Post by: Volker Dirr on May 22, 2018, 02:29:12 PM
You can sent SIGTERM