Giter VIP home page Giter VIP logo

Comments (9)

ltguillaume avatar ltguillaume commented on July 1, 2024

450840b introduces new problems:

  1. It seems that there is no longer a way to see which section is being searched if global is false.
  2. Translations now show e.g. Suche in <no value>.

from compose.

onweru avatar onweru commented on July 1, 2024

@ltguillaume,

This is a breaking change indeed.

This changed

[search_field_placeholder]
  other = "Search {{ .section }}"

to

[search_field_placeholder]
  other = "Search"

from compose.

onweru avatar onweru commented on July 1, 2024

It should work now, with or without the change.

from compose.

ltguillaume avatar ltguillaume commented on July 1, 2024

But it seems that you removed the indicator that the user is only searching a specific section if global = false, right?

If I understand that correctly, I think that could lead to confusion.

from compose.

onweru avatar onweru commented on July 1, 2024

@ltguillaume, that indicator still exists when global is false. I modified how it's injected.

Previously it was baked into the translation string, that's not necessary.

from compose.

ltguillaume avatar ltguillaume commented on July 1, 2024

Ok, so I need to remove it from the translations, thanks. It just said Suche in <no value> but perhaps the section is shown after that and it was cut off due to the size of the input box. I'll check soon.

from compose.

onweru avatar onweru commented on July 1, 2024

so I need to remove it from the translations

Not necessarily. I added a fallback in the template that sets the <no value> part to an empty string. Just for backward compatibility.

from compose.

ltguillaume avatar ltguillaume commented on July 1, 2024

I'm not following. Does this mean there is a translation missing, or that the new JS function passes on an empty string, which it shouldn't in any case.

from compose.

onweru avatar onweru commented on July 1, 2024

@ltguillaume,

Have you tested the new change on your local though? Because I tested and all was good. Feels like we're now arguing over theory

About the empty string, I was referencing this line

{{- $default := T "search_field_placeholder" (dict "section" "") }}

(dict "section" "") }}

👆🏼 part ensures that the right context is parsed if you have other = "search in" or other = "search in {{ .section }}".

from compose.

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.