Uploaded image for project: 'BookBrainz'
  1. BookBrainz
  2. BB-134

Dynamic default alias implementation

    XMLWordPrintable

    Details

      Description

      In the near future, we would like to be able to remove the "default alias" field from the database, as it isn't storing any useful data (only a display hint). It should be possible to implement an algorithm to select the correct alias to display to the user without this flag. The details of the algorithm are below:

      1. Obtain a list of aliases for an entity, and the user's native language
      2. Filter the list of aliases to find any primary aliases for the user's native language - if there is one, use this
      3. Filter the list of aliases to find any primary alias which matches the language of the entity (where applicable) - if there is one, use this
      4. Filter the list of aliases to find any primary alias in English - if there is one, use this
      5. Filter the list of aliases to find any primary alias - if there is one, use this
      6. If there are no primary aliases, use the first alias in the alias list
      7. If there are no aliases, use "(untitled)" or "(unnamed)"

      For now, this algorithm should be implemented in the web service, and used to set a field "display_alias" on the JSON object returned for each entity type.

        Attachments

          Activity

            People

            • Assignee:
              stanislas Stanisław Szcześniak
              Reporter:
              lordsputnik Ben Ockmore
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                February 2016 (2016-02-09)