opral / inlang-message-sdk

0 stars 0 forks source link

Expose project `name` property #26

Open felixhaeberle opened 2 months ago

felixhaeberle commented 2 months ago

Context

This discussion came up while using the name of an inlang project in Sherlock. It would be great to have a project property called name which is the name of the inlang project.

Proposal

The name of the inlang project is most likely just the directory (file) name of the inlang project itself such as project.inlang, backend.inlang or happy-elephant.inlang


----

@samuel.stroschein said in SHERL-22:

EDIT: Is there a way to get the project name from the SDK API? Or can we only get it by reading the file path?

Only the file path name.

Suggestion: Pink message sdk team if adding project.name makes sense.

jldec commented 2 months ago

Proposal

Extend the project api to expose the current project directory path (absolute), from loadProject, and the project name from {name}.inlang directory.

This will be read-only.