Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown activity problem with eXe en CA #441

Closed
ignaciogros opened this issue Oct 15, 2019 · 19 comments
Closed

Dropdown activity problem with eXe en CA #441

ignaciogros opened this issue Oct 15, 2019 · 19 comments
Assignees

Comments

@ignaciogros
Copy link
Collaborator

ignaciogros commented Oct 15, 2019

Using eXe in CA, the second TinyMCE of the Dropdown Activity iDevice won't appear.

I think it's because of the CA version of this string:

<p>Enter the text for the dropdown activity in to the dropdown field \nby either pasting text from another source or by typing text directly into the \nfield.<\/p><p> To select words to choose, double click on the word to select it and \nclick on the 'Hide\/Show' button below.<\/p>

It might be the way the last paragraph is closed.

Could you check that, @jrfern? Thank you very much.

@jrfern
Copy link
Member

jrfern commented Oct 19, 2019

I've been working on the issue, unsuccessfully. My first hypothesis was a mistake in the .ca PO file, as it was the only one creating the problem, but I haven't been able to find one. Then I found a problem in the html code in listaidevice.py, line 351, which I tried to fix (changed
to
--no good, does it break the closing tag?-- and <br / >), now creating problems in the rest of the translations: the translations are not shown, although they exist.

My conclusion: it's not simply a string problem, but a problem with the interaction between code and strings, with is beyond my knowledge. Sorry I couldn't fix the issue. By the way, a new idea, does the vertical bar | interfere with anything anywhere?

@jrfern
Copy link
Member

jrfern commented Oct 19, 2019

See? Even github needs protecting the hmtl code. I tried to write that I had changed ""/br>"" (break with the slash before) into ""
"" (break with the slash inmediately after).

@ignaciogros
Copy link
Collaborator Author

Did you try changing line 2139 in cs/LC_MESSAGES/exe.po?
I think that this is what causes the error: </ p>
Instead of: </p>
But I can't compile the po files right now...

Maybe we can fix all those wrong BR automatically. Thank you!

@ignaciogros
Copy link
Collaborator Author

Hi @jrfern:

I just checked the last commits (like d39bd08), and I saw <br / > instead of <br />

When closing a tag, a slash has to be immediately followed by >. Otherwise it won't be valid HTML, and some things might not work. That's what happened with this iDevice.

Could you revert those changes or replace those BR? If you prefer, I can do it too, but I might need some help with that. Thank you...

jrfern added a commit that referenced this issue Oct 20, 2019
@jrfern
Copy link
Member

jrfern commented Oct 20, 2019

Did you try changing line 2139 in cs/LC_MESSAGES/exe.po?
I think that this is what causes the error: </ p>

If you mean es/LC_MESSAGES/exe.po, that line has nothing to do with the issue, and I haven't been able to find an occurrence of "< /p>" in my PO file.

I just checked the last commits (like d39bd08), and I saw <br / > instead of

Yes, I know it's wrong, it was to test to try to start some more meaningful error (I had already tried "<br /"> without success). Reverted.

A detail. Could you please start eXe in English, create a Dropdown Activity and check whether there is a space after the parenthesis in "(vertical bar )"? I removed it in exe/engine/listaidevice.py - why isn't the change visible in any language?

@ignaciogros
Copy link
Collaborator Author

Sorry. I didn't see your question.

[...] why isn't the change visible in any language?

It worked after deleting the user's "idevice" folder. The string's in the extended.data file.

@david-puente: Do you know why that string's there? Is there any way to fix that without manually removing that folder/file?

Thank you.

@ignaciogros ignaciogros added the C label Oct 30, 2019
@JuanPerezSdweb
Copy link
Contributor

The string is in the extended.data file because in this file save python extended idevices.

To fix that without manually removing that folder/file, it would be necessary to delete or overwrite this file every time exe is started

@ignaciogros
Copy link
Collaborator Author

ignaciogros commented Nov 13, 2019

Would removing the extended.data file delete the user's custom iDevices or any preferences? Not in my tests...

If the user doesn't lose any data, we can overwrite that file (only that file: extended.data) when upgrading eXe. Don't forget to test with new custom iDevices and copies of other iDevices (like Objectives).

@jrfern
Copy link
Member

jrfern commented Nov 15, 2019

Sorry, the extended.data is only a secondary bug I discovered while trying to fix this issue (CA not showing the edition box). I'm afraid I have to reopen the issue.

@jrfern jrfern reopened this Nov 15, 2019
@ignaciogros
Copy link
Collaborator Author

It seems to be the same problem again. What happened with your changes, @jrfern? See line 1316 in ca.js. The paragraph is closed like this again: <\/ p> It should be <\/p> It's like that in exe.mo too.

Could you check that? If the problem remains, I suggest changing the original string in listaidevice.py and translate the new new one. If that's OK...

I see that the second P starts with a space. Maybe we could just remove it so you can reuse the translated strings: <p>To select words to choose instead of <p> To select words to choose

Thank you.

@jrfern
Copy link
Member

jrfern commented Nov 18, 2019

Carles Ferrando (the Catalan translator) and I have been working on this bug. It seems it has been fixed already - please check so we can close the issue.

@ignaciogros
Copy link
Collaborator Author

I think it was OK 29 days ago (a6ef2a0), but it changed back to </ p> 12 days ago (03cb01c). Did you see any other missing changes? Thank you.

@ignaciogros
Copy link
Collaborator Author

ignaciogros commented Nov 19, 2019

I didn't see yesterday's commit (d38c3e5). It works for me. Thank you!

@ignaciogros
Copy link
Collaborator Author

@david-puente:

I works now if you delete the "config" folder, but can we overwrite extended.data to avoid problems when upgrading? Thank you.

@jrfern
Copy link
Member

jrfern commented Nov 19, 2019

So, we have solved the Catalan version problem, we still have to fix the extended.data issue.

An idea. Each time eXe is started a log file is created, as well as some temporal files. Could extended.data be a temporal file, or at least could it be recreated when eXe is launched?

@JuanPerezSdweb
Copy link
Contributor

We have add a change in the commit (82078c2) to verify if there is a variable that we have added to the conf file, if it does not exist, recreate the extended.data file and add the variable to the conf file so that the file is not rewritten every time that the eXe starts.
Do you think it is better to create it every time the eXe starts?

@ignaciogros
Copy link
Collaborator Author

If no user data is lost, it can be created any time eXe starts, like other files, but it doesn't make much difference anyway. I'll try to do it as in other files if it's easy. The most important thing is avoiding data loss. Thank you.

@JuanPerezSdweb
Copy link
Contributor

We have not seen user data stored in the extended.data.

Is it necessary to remove it every time or just the first time as it has been implemented?

@ignaciogros
Copy link
Collaborator Author

If that folder's created each time eXe's launched, I think that creating it every time would be OK, but do it just once if you think it's better. I'd do it each time, but you know better than me what's that file for.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants