GithubHelp home page GithubHelp logo

Comments (2)

julen avatar julen commented on June 14, 2024

The situation is somehow handled in the goto method but callsites take no action upon (there are only 3 callers, two of them in the routing code, the other one as part of the click handler for view rows).

By the way, I am unsure what your suggestion is, as there is no Unit not found message anywhere; are you referring to the No units found message perhaps? However that is used when there are no results at all (plus it displays no rows), and in this context it would be misleading.

from zing.

iafan avatar iafan commented on June 14, 2024

My suggestion was to show some meaningful message when the unit is not found, and make sure user understands that the unit wasn't found in the first place (previously, IIRC, we would just silently show the first available unit instead, not the one the user explicitly wanted to see when following some permalink, which was also bad). Sorry if my description was a bit ambiguous. I was referring to a 'Unit not found' message as something we would want to have implemented.

I refactored the related code and messaging a bit, and this is how it will look like now:

  1. When there are no units in current language/section/folder/file, the user will see the following message:
No units found in this translation scope.

This message is supposed to be visible to admins only, since currently only admins can see empty items in the browser.

  1. When no units match the search criteria, the message will be:
No units match your search criteria.
  1. When there are units in current language/section/folder/file, but the requested unit wasn't found in the list, the message will be:
Unit #NNNNNNNN is no longer available.
_Show all other units in this translation scope_

Clicking on a link will show all the units (we will go to the first found unit).

  1. When there are units matching search criteria, but the requested unit wasn't found in the list, the message will be:
Unit #NNNNNNNN no longer matches your search criteria or is no longer available.
_Show all other units matching your search criteria_

Clicking on a link will show all the units (we will go to the first found unit).

I'll make a PR soon.

from zing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.