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

Large strings can sometimes cause language translation can fail #2674

Closed
interduo opened this issue May 7, 2019 · 17 comments
Closed

Large strings can sometimes cause language translation can fail #2674

interduo opened this issue May 7, 2019 · 17 comments
Labels
unverified Some days we don't have a clue
Milestone

Comments

@interduo
Copy link
Contributor

interduo commented May 7, 2019

Describe the bug
Content of web is outside browser (and no thereis no scrollbars).
I cannot see whole page content in theme MODERN.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://cacti/user_admin.php?action=user_edit&id=19&tab=realms'
  2. See whole page

Expected behavior
Content of page in the visible place of browser.

Screenshots
content-cacti

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser: Chromium
  • Version: 73.0.3683.103
@interduo interduo changed the title Frontend bug in modern theme - Content of page is outside browser [1.2.3] Frontend bug in modern theme - Content of page is outside browser May 7, 2019
@bmfmancini
Copy link
Member

Not seeing the same thing here
I am using Firefox 66.0.4 (64-bit)

Maybe an issue specific to chromium try firefox on your end

Thanks!

@interduo
Copy link
Contributor Author

interduo commented May 7, 2019

Change language to Polish. This causes problem:

Project-Id-Version: Report-Msgid-Bugs-To: POT-Creation-Date: 2019-03-10 13:25-0400 PO-Revision-Date: 2019-03-10 13:43-0400 Last-Translator: Language-Team: Language: pl_PL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2); X-Generator: Poedit 2.2.1

If I remove it from frontend using firebug it's ok.

@cigamit
Copy link
Member

cigamit commented May 8, 2019

Yes, somehow we are attempting to translate and empty string. We've seen this one time before.

@cigamit
Copy link
Member

cigamit commented May 8, 2019

Okay, using the develop version with latest syslog, and the latest polish translation, I can not reproduce this. So, I suspect it's solved. Can you please do the same and confirm?

@cigamit cigamit added the unverified Some days we don't have a clue label May 8, 2019
@interduo
Copy link
Contributor Author

interduo commented May 8, 2019

Don't want to update to develop version. I am using master branch.
When will 1.2.4 will come up? I will check on that version.

@cigamit
Copy link
Member

cigamit commented May 8, 2019

We are trying to get it out. Unfortunately, there have been a few incidents that are delaying the release. We are pushing hard, but peoples health comes first.

@interduo
Copy link
Contributor Author

interduo commented May 8, 2019

So please don't close this issue till my test on 1.2.4 version.

@cigamit
Copy link
Member

cigamit commented Jun 23, 2019

No feedback. I've checked on version 1.2.4 and can not reproduce. Someone needs to verify the Polish strings. Under both User Management and User Group Management, there are several untranslated strings.

You can go to https://translate.cacti.net and sign up for an account. When using the Translate site, performing translations for not only Cacti, but all of our Plugins is quite simple. If you wish to be in charge of approving strings for the Polish language, you simply need to reach out to @netniV who can do the assignment.

@cigamit
Copy link
Member

cigamit commented Jun 23, 2019

Here is the link to where you would start with an account to Translate Cacti into Polish:

https://translate.cacti.net/projects/cacti/core/pl-PL/

@cigamit cigamit closed this as completed Jun 23, 2019
@interduo
Copy link
Contributor Author

The issue still exists in Polish translation.
I did some translations but cannot find the missing translations.

Please reopen this.

@interduo
Copy link
Contributor Author

Look there is no strings from user_edit form in localization files.

I tried to search this by:
https://translate.cacti.net/search/cacti/core/?checksum=&offset=&q=Realtime+Graphs&search=ftx&source=on&target=on&context=on&location=on&comment=on&type=all&ignored=False&date=&only_user=&exclude_user=&lang=pl-PL

@netniV
Copy link
Member

netniV commented Jul 11, 2019

@interduo can you please link the source string that you believe to be wrong?

@netniV
Copy link
Member

netniV commented Jul 11, 2019

I have found that the string exists in the POT file:

locales/po/cacti.pot:6635:msgid "Realtime Graphs"
locales/po/cacti.pot:11796:msgid "How do you wish to view Realtime Graphs?"

I also noticed that your search link is using FullText and that appears to fail in finding the string. If you change that to Substring, it correct finds the above two entries.

https://translate.cacti.net/search/cacti/core/?checksum=&offset=&q=Realtime+Graphs&search=substring&source=on&target=on&context=on&location=on&comment=on&type=all&ignored=False&date=&only_user=&exclude_user=&lang=pl-PL

@interduo
Copy link
Contributor Author

interduo commented Jul 11, 2019

Well, just look at the first screenshot. In Plugin permission tab - probably the missed the header before "Device Monitoring" if there is any.

@interduo
Copy link
Contributor Author

cacti

@interduo
Copy link
Contributor Author

If I change to English there is no debug text.

@netniV
Copy link
Member

netniV commented Jul 11, 2019

I've found and I am about to commit a change to all the POT/PO files. The issue seems to be that the MSGID is being wrapped but when it is, the ID goes from being the full string to having a blank first line then the rest that follows.

To correct this issue, we can tell it not to wrap on both the xgettext and msgmerge calls. Hopefully, this will have no side effects but I am going to try committing this to the develop branch now.

Can you test update to the latest once it is there and then test that?

@netniV netniV reopened this Jul 11, 2019
@netniV netniV added this to the v1.2.5 milestone Jul 11, 2019
@netniV netniV changed the title [1.2.3] Frontend bug in modern theme - Content of page is outside browser When a string is above 80 characters, language translation can fail due to wrapped MSGID's Jul 11, 2019
@netniV netniV closed this as completed in d7aa894 Jul 11, 2019
@netniV netniV changed the title When a string is above 80 characters, language translation can fail due to wrapped MSGID's Large strings can sometimes cause language translation can fail Jul 14, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
unverified Some days we don't have a clue
Projects
None yet
Development

No branches or pull requests

4 participants