Git Product home page Git Product logo

Comments (5)

martinlingstuyl avatar martinlingstuyl commented on June 17, 2024 1

I understand. It began as a question regarding specific extension, so I filed it here. I'll refile it in the correct issues list.

from sp-dev-fx-extensions.

martinlingstuyl avatar martinlingstuyl commented on June 17, 2024 1

And there it is, for the sake of progeny: SharePoint/sp-dev-docs#922

from sp-dev-fx-extensions.

martinlingstuyl avatar martinlingstuyl commented on June 17, 2024

I dug a little deeper, and it seems localizing Command Sets in this manner is not yet implemented, or forgotten all about.

In a file named listview-host-assembly-[locale]_[hash].js the commandslist is loaded from the spfx extension manifest.

While the manifest file neatly contains our localized resources:
image

...the commands list is instantiated with the default property:
image

from sp-dev-fx-extensions.

martinlingstuyl avatar martinlingstuyl commented on June 17, 2024

So basically we're currently stuck with a workaround like this:

public onInit(): Promise<void> {
    Log.info(LOG_SOURCE, 'Initialized CommandSetTestCommandSet');

    this.context._commands.forEach((command) => {
      command.title = strings[command.id];
    });

    return Promise.resolve();
  }

...which would force us to name resource properties after our command id's (in this case COMMAND_1, COMMAND_2)

from sp-dev-fx-extensions.

VesaJuvonen avatar VesaJuvonen commented on June 17, 2024

thx Martin, since this is a potential bug in the SPFx, would suggest using Issues list in https://github.com/SharePoint/sp-dev-docs/issues. which is our main channel for getting these kinds of potential issues known... and is getting synced to VSO automatically. I'll close this from here but would suggest to re-open in the right location so it gets the needed attention. I do apologize for the additional work. We use the sp-dev-docs for generic input and other repositories would be good for sample-specific issues, but not really for reporting potential issues in the actual SPFx. Thx for the issue details advance.

from sp-dev-fx-extensions.

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.