• Welcome to DictionaryForMids Forum.
 

Question regarding country flags

Started by arsen_a, 17. June 2008, 11:27:33

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arsen_a

Hi everybody!

I created a unidirectional Spanish-Russian dictionary but there is one inconvenience. This dicitonary displays only one country (Spanish) flag, Russian flag is absent. Is it possible to change something in DictionaryForMIDs.properties file to include in dictionary Russian flag also? Here is the content of my DictionaryForMIDs.properties file, hope it can help! Thanks in advance.

infoText:  Spanish-Russian dictionary
      dictionaryAbbreviation: IDP
      numberOfAvailableLanguages: 2
      language1DisplayText: Spanish
      language2DisplayText: Russian
      language1FilePostfix: Esp
      language2FilePostfix: Rus
      language2IsSearchable: false
      language2GenerateIndex: false
      language1DictionaryUpdateClassName=de.kugihan.dictionaryformids.dictgen.dictionaryupdate.DictionaryUpdatePartialIndex
      dictionaryGenerationSeparatorCharacter: ':'
      indexFileSeparationCharacter: ':'
      searchListFileSeparationCharacter: ':'
      dictionaryFileSeparationCharacter: ':'
      dictionaryGenerationInputCharEncoding: UTF-8
      indexCharEncoding: UTF-8
      searchListCharEncoding: UTF-8
      dictionaryCharEncoding: UTF-8
      language1NormationClassName: de.kugihan.dictionaryformids.translation.normation.NormationLat
      language2NormationClassName: de.kugihan.dictionaryformids.translation.normation.NormationRus

Gert

From a quick look at your DictionaryForMIDs.properties file things look fine (one point though: probably your dictionary is not an IDP dictionary, right ?).

About the flags, did I well understand: the Spanish flag is correctly displayed on the 'start screen' also on the 'Settings' dialogue, but the Russian flag is not displayed ?

Strange, I can't see a reason for this right now.

If there is still a problem with the Russian flag, could you send me the complete JAR file, then I will look at it.

Regards,
Gert

arsen_a

Hi Gert,

Thanks for your reply. As you can remember this is that very Spanish-Russian dictionary, that you helped me to create a year ago. Now I managed to decrease  its size quite enough to contain country flags. This is a unidirectional dictionary and I created another one, bidirectional, which displays both flags. So, is it possible to change some settings in .properties file to push the dictionary to display both flags? Regarding to the Spanish flag, yes, it is correctly displayed on the 'start screen' also on the 'Settings' dialogue. Regarding to the JAR file, after building the dictionary that file does not contain Russian flag  :( , if you still need it I can send it to you!

Gert

Sure I remember !

So you did already do what I wanted to check: whether the Russian flag is still in the JAR file.

Seems JarCreator removed it - for the moment I have no clue why. I believe the following line is relevant:

language2DisplayText: Russian

But that seems ok for me.

I will try to look at this problem during one of the next days (possibly over the weekend).

Regards,
Gert

arsen_a

OK, Gert. I will wait for your answer!  :)

Gert

Could you please send me your DictionaryForMIDs.properties file ? I know you copied the content above, still it would be useful to have the file itself.

Thanks !
Gert

Gert

QuoteI would like to add Armenian flag into this dictionary. I know that these flags must be present in the empty JAR file. Is it easy for you to add them into empty JAR file or you need to change many things in dictionary source code? If it is easy, just let me know, I will send to you PNG files containing Armenian flag, deal? :)

Just the flag needs to be added, nothing else needs to be done. No change in the source, no change in the configuration files.

However, I do need to have the flag as PNG file in all the following pixel sizes: 12, 16, 20, 24, 32.

If you can do this, just send me the language files and I will add them to the DfM baseline.


QuoteAbout displaying both flags in unidirectional dictionary, I did some investigation and found out, that, if I comment the line 'language2IsSearchable: false' and recompile the dictionary, in Settings dialog, where you can change the direction, Russian flag is present but if I change direction and try to search for a word, of course I get an error in the program. I don't know, if this information is helpful for you!

Ah, great that you did investigate there and you found the cause ! Yes, this is a very good hint - thank you for this !

Actually, this is a desired behaviour ! If you can't search for Russian then in the settings dialogue the whole entry for Russian is not shown. Not only the flag is missing, but the whole line for Russian, true ?

Likewise on the start screen: if there are no entries for Russian to search for, then also here the whole line for Russian is not shown, not only the flag. Is this true ?

Best regards,
Gert

arsen_a

 Let me do not agree with you. In the settings dialogue below the line 'To language' the text 'Russian' is always shown and after commenting the line 'language2IsSearchable: false' Russian flag is also appears there. You can find it in the attached screenshots. I would like to have the Russian flag there in any case and would be nice to see both flags in the start screen of dictionary also.

Gert

Now I got it !

Ok, JarCreator should not filter the flag if there language2IsSearchable is set to false. I will correct this for the next version of JarCreator.

Short term as a workaround you could add the flag files manually to the Jar-file, then DictionaryForMIDs will use it (at least I believe so).

About the flag on the 'start screen': well the flags are shown next to the number of entries that can be searched; which would be 0 for Russian. Hmmm, do you have any idea what to do there best ?

Regards,
Getr


arsen_a

OK Gert,

Which program is better to use to add the flags into the dictionary? You know, I tried to do it with Filezip, but this program adds the flags in a different folder, though it shows that it added flags in appropriate folder under Icons directory :(
Regarding to the start screen, I suggest to add such line with a flag: "Russian 7100 entries". It means, that there are for example 7100 Russian words in the dictionary, though you cannot search in Russian entries. Is this OK for you? Can you make the dictionary in this way?

Gert

Hmmm, under Windows 7zip is often used, maybe that could work better for you ?

Yes, your proposal on the start screen is doable. I'll put it on a todo list, maybe in the future there will be a volunteer who can implement this. I myself have too many other items on my todo list (and nobody to support me there :( ).

Ok, thank you a lot !!
Gert

arsen_a

OK Gert, then I will wait for the next version :)
So I will try the 7zip and inform you about results. BTW, may I suggest something else? :) In the dictionary, when we enter some word, we should press the cell phones navigator button, which means OK in the dictionary screen, after this we go to the next screen, where we should press the left button (means Options), then choose Translate and again press the navigation button. I think it is so long way for one word translation. Isn't it possible to change the source code to translate the entered word immediately by pressing the navigation button, which could be changed into button Translate! Nice idea, right? :)
Thanks again for your help. I wish you good luck and all the best in your work.

Gert

Starting a translation should be a one-key press. No more than one key should be needed for this.
Typically the translation button is mapped by the device to 'a central key'. Note that DfM does not define the key that is used, it is the device that does this.

There had been quite a few requests in the past where people said "but on my device I would like to have function x on key y" and so I started changing around key priorities; which made some people happy and at the same time others unhappy.

Here is the code extract from class MainForm (simplified):
settingsCommand = updateCommand(settingsCommand, UIDisplayTextItems.CommandSettings, Command.SCREEN, 6);
helpCommand = updateCommand(helpCommand, UIDisplayTextItems.CommandHelp, Command.SCREEN, 8);
infoCommand = updateCommand(infoCommand, UIDisplayTextItems.CommandInfo, Command.SCREEN, 9);
newWordCommand = updateCommand(newWordCommand, UIDisplayTextItems.CommandNewWord, Command.SCREEN, 3);
forwardWordCommand = updateCommand(forwardWordCommand, UIDisplayTextItems.CommandForwardWord, Command.SCREEN, 5);
backWordCommand = updateCommand(backWordCommand, UIDisplayTextItems.CommandBackWord, Command.SCREEN, 4);
changeInputLanguageCommand = updateCommand(changeInputLanguageCommand, UIDisplayTextItems.CommandChangeInputLanguage, Command.SCREEN, 2);
// for the exitCommand Command.EXIT is not used, because typically the devices reserve a high-priority
// location for this and several users requested to put this command at a lower-priority location (usually
// somewhere in the option menu):
exitCommand = updateCommand(exitCommand, UIDisplayTextItems.CommandExit, Command.SCREEN, 7);   

[...]
translateCommand = updateCommand(translateCommand, UIDisplayTextItems.CommandTranslate, Command.SCREEN, 1);



From the last line you can see that the Translate button has the highest priority (= 1). If your device decides to put it only some place down the menu, please complain at the device maunufacturer.

Also, there are cell phones with a missing 'in-line editor' capability (these cell phones open a separate editing 'window'). Again, please complain at the cell phone manufacturer. Or, please find a volunteer for implementing the OwnTextField" / IME (input method editor) for DfM  ;) (see thread on this topic in the forum).


Besides, I just added your Armenian flags to the CVS repository. These will be included in the next release of DfM (3.3) - which probably still will take a few months, so please don't wait for it.

Regards,
Gert

Gert

Besides, can you release your dictionary to the public ? Maybe we also can publish it on our DfM web site ?

Regards,
Gert

arsen_a

 Hi Gert, sorry for delayed answer, I was busy with building English-Armenian dictionary with flags  :) Now I did it and of course you can publish it on DFM web site, I have checked the source is free! Shall I send it to you or to Peter Kmet ?
Regarding to my question about one-key translation, I am sorry, I didn't know that some cell phones open a separate editing 'window'!  ;)
BTW, I continued my investigations and I would like to share some information with you.
If I comment the line 'language2IsSearchable: false' then in the Settings dialog the second country flag appears after compilation. Then if I comment the specified line and add the line 'language2IndexNumberOfSourceEntries=7790' in DictionaryForMIDs.properties file in Output directory and comment this line 'language2GenerateIndex=false', then in the Start screen of the program both flags appear and there is a line, that the 2nd language contains 7790 entries.
I hope, this information is useful for you and you can correct something in the code that since the new version JarCreator should not filter the flags  ;)
One thing is left, I tried 7zip but it doesn't add the files in the desired directory, it adds them in the root directory :( then I found another good program, it is called Alzip, it is a freeware and it does everything in a perfect way.
Thanks again for your help.

Regards, Arsen.