Closed Bug 1694504 Opened 8 months ago Closed 8 months ago

Find & Replace fails for some strings

Categories

(Webtools Graveyard :: Pontoon, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mathjazz, Assigned: mathjazz)

Details

Attachments

(1 file)

Reporting on behalf of Itiel from chat:

STR:

  1. Go to https://pontoon.mozilla.org/he/firefox-accounts/all-resources/?string=220453.
  2. Check only the current string.
  3. In the Find field enter אירעה שגיאה, in the Replace With field enter הייתה בעיה.
  4. Click Replace All.
  5. "Oops, something went wrong" appears in the console.

Error log:

Internal Server Error: /batch-edit-translations/
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/app/.heroku/python/lib/python3.8/site-packages/newrelic/hooks/framework_django.py", line 544, in wrapper
    return wrapped(*args, **kwargs)
  File "/app/.heroku/python/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/app/.heroku/python/lib/python3.8/site-packages/django/views/decorators/http.py", line 40, in inner
    return func(request, *args, **kwargs)
  File "/app/pontoon/base/utils.py", line 124, in wrap
    return f(request, *args, **kwargs)
  File "/app/.heroku/python/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/app/pontoon/batch/views.py", line 121, in batch_edit_translations
    action_status = action_function(form, request.user, active_translations, locale,)
  File "/app/pontoon/batch/actions.py", line 170, in replace_translations
    ) = utils.find_and_replace(translations, find, replace, user)
  File "/app/pontoon/batch/utils.py", line 100, in find_and_replace
    new_translation.string = ftl_find_and_replace(
  File "/app/pontoon/batch/utils.py", line 62, in ftl_find_and_replace
    new_ast = old_ast.traverse(replace_text_elements)
AttributeError: 'Message' object has no attribute 'traverse'
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.