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

Searching a phrase after uploading a po file does not find query #4548

Closed
superDross opened this issue Sep 20, 2020 · 5 comments
Closed

Searching a phrase after uploading a po file does not find query #4548

superDross opened this issue Sep 20, 2020 · 5 comments
Labels
question This is more a question for the support than an issue.

Comments

@superDross
Copy link
Contributor

superDross commented Sep 20, 2020

Describe the bug

After uploading a po file via the api I try to search for a msgid/source-string in the UI via (<weblate-url>/translate/<project>/<component>/<lang>) I see the string is not present. However, when I grep the raw po file on the Weblate server the source string and translated string are present.

Server configuration and status

DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git review --version [retcode=0]
DEBUG git: exec git review --version [retcode=0]
DEBUG git: exec git svn --version [retcode=0]
DEBUG git: exec git svn --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG hg: exec hg version -q [retcode=0]
DEBUG hg: exec hg version -q [retcode=0]
DEBUG git: exec git config --global merge.weblate-merge-gettext-po.name Weblate merge driver for Gettext PO files [retcode=0]
DEBUG git: exec git config --global merge.weblate-merge-gettext-po.name Weblate merge driver for Gettext PO files [retcode=0]
DEBUG git: exec git config --global merge.weblate-merge-gettext-po.driver /usr/local/lib/python3.7/dist-packages/weblate/examples/git-merge-gettext-po %O %A %B [retcode=0]
DEBUG git: exec git config --global merge.weblate-merge-gettext-po.driver /usr/local/lib/python3.7/dist-packages/weblate/examples/git-merge-gettext-po %O %A %B [retcode=0]
DEBUG git: exec git config --global user.email noreply@weblate.org [retcode=0]
DEBUG git: exec git config --global user.email noreply@weblate.org [retcode=0]
DEBUG git: exec git config --global user.name Weblate [retcode=0]
DEBUG git: exec git config --global user.name Weblate [retcode=0]
 * Weblate: 4.3-dev
 * Django: 3.1.1
 * siphashc: 2.1
 * Whoosh: 2.7.4
 * translate-toolkit: 3.0.0
 * lxml: 4.5.2
 * Pillow: 7.2.0
 * bleach: 3.1.5
 * python-dateutil: 2.8.1
 * social-auth-core: 3.3.3
 * social-auth-app-django: 4.0.0
 * django-crispy-forms: 1.9.2
 * oauthlib: 3.1.0
 * django-compressor: 2.4
 * djangorestframework: 3.11.1
 * django-filter: 2.3.0
 * django-appconf: 1.0.3
 * user-agents: 2.2.0
 * filelock: 3.0.12
 * setuptools: 40.8.0
 * jellyfish: 0.8.2
 * openpyxl: 3.0.5
 * celery: 4.4.7
 * kombu: 4.6.11
 * translation-finder: 2.1
 * html2text: 2020.1.16
 * pycairo: 1.16.2
 * pygobject: 3.30.4
 * diff-match-patch: 20200713
 * requests: 2.24.0
 * django-redis: 4.12.1
 * hiredis: 1.1.0
 * sentry_sdk: 0.17.5
 * Cython: 0.29.21
 * misaka: 2.1.1
 * GitPython: 3.1.8
 * borgbackup: 1.1.13
 * pyparsing: 2.4.7
 * Python: 3.7.3
 * Git: 2.20.1
 * psycopg2: 2.8.6
 * psycopg2-binary: 2.8.6
 * phply: 1.2.5
 * chardet: 3.0.4
 * ruamel.yaml: 0.16.12
 * tesserocr: 2.5.1
 * akismet: 1.1
 * boto3: 1.14.61
 * zeep: 3.4.0
 * aeidon: 1.7.0
 * iniparse: 0.5
 * mysqlclient: 2.0.1
 * Mercurial: 5.5.1
 * git-svn: 2.20.1
 * git-review: 1.28.0
 * Redis server: 5.0.7
 * PostgreSQL server: 10.12
 * Database backends: django.db.backends.postgresql
 * Cache backends: default:RedisCache, avatar:FileBasedCache
 * Email setup: django.core.mail.backends.smtp.EmailBackend: email1.ldc.yougov.local
 * OS encoding: filesystem=utf-8, default=utf-8
 * Celery: 
 * Platform: Linux 4.15.0-112-generic (x86_64)

Weblate deploy checks

DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git review --version [retcode=0]
DEBUG git: exec git review --version [retcode=0]
DEBUG git: exec git svn --version [retcode=0]
DEBUG git: exec git svn --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG git: exec git --version [retcode=0]
DEBUG hg: exec hg version -q [retcode=0]
DEBUG hg: exec hg version -q [retcode=0]
DEBUG git: exec git config --global merge.weblate-merge-gettext-po.name Weblate merge driver for Gettext PO files [retcode=0]
DEBUG git: exec git config --global merge.weblate-merge-gettext-po.name Weblate merge driver for Gettext PO files [retcode=0]
DEBUG git: exec git config --global merge.weblate-merge-gettext-po.driver /usr/local/lib/python3.7/dist-packages/weblate/examples/git-merge-gettext-po %O %A %B [retcode=0]
DEBUG git: exec git config --global merge.weblate-merge-gettext-po.driver /usr/local/lib/python3.7/dist-packages/weblate/examples/git-merge-gettext-po %O %A %B [retcode=0]
DEBUG git: exec git config --global user.email noreply@weblate.org [retcode=0]
DEBUG git: exec git config --global user.email noreply@weblate.org [retcode=0]
DEBUG git: exec git config --global user.name Weblate [retcode=0]
DEBUG git: exec git config --global user.name Weblate [retcode=0]
SystemCheckError: System check identified some issues:

CRITICALS:
?: (weblate.E020) The Celery is not configured to store results, CELERY_RESULT_BACKEND is probably not set.
	HINT: https://docs.weblate.org/en/latest/admin/install.html#celery

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
?: (security.W019) You have 'django.middleware.clickjacking.XFrameOptionsMiddleware' in your MIDDLEWARE, but X_FRAME_OPTIONS is not set to 'DENY'. Unless there is a good reason for your site to serve other parts of itself in a frame, you should change it to 'DENY'.
?: (weblate.W025.xwiki-fullpage) Failure in loading handler for xwiki-fullpage file format: module 'translate.storage.properties' has no attribute 'XWikiFullPage'
	HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.xwiki-java-properties) Failure in loading handler for xwiki-java-properties file format: module 'translate.storage.properties' has no attribute 'xwikifile'
	HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.xwiki-page-properties) Failure in loading handler for xwiki-page-properties file format: module 'translate.storage.properties' has no attribute 'XWikiPageProperties'
	HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps

INFOS:
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
	HINT: https://docs.weblate.org/en/latest/admin/backup.html
@nijel
Copy link
Member

nijel commented Sep 21, 2020

Can you please clarify a bit more what you do?

  • How is your component configured? Is it bilingual or monolingual?
  • How do you upload? To the source or translation? What upload method do you use?

My quick guesses what might lead to this:

  • With monolingual translation the list of strings is taken from the source language. In case the msgid is not present there, it's not loaded from the target languages either (because there would be no source string for it).

@nijel nijel added the question This is more a question for the support than an issue. label Sep 21, 2020
@github-actions
Copy link

This issue looks like a support question. We try to answer these reasonably fast, but in case you are looking for faster resolution, please consider purchasing support subscription and make Weblate stronger.

@stale
Copy link

stale bot commented Oct 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added wontfix Nobody will work on this. and removed wontfix Nobody will work on this. labels Oct 4, 2020
@superDross
Copy link
Contributor Author

We think we have found the cause of the issue.

This issue seemed to have occurred due to having two of the exact same phrases in an uploaded PO file (via the API).

@github-actions
Copy link

github-actions bot commented Oct 9, 2020

The issue you have reported seems to be resolved now.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

2 participants