Closed jolly-jump closed 3 years ago
Hello,
@jeffbeck : do you see a problem with using "_" or "-" in project names ? When not, I can extend the scheme in the Webui.
Arnaud
Just for the record: I do have several old projects which were migrated from the 6.2 which have the "_" in the name, like p_agbogy and I am 100% sure they were created by collegues through the old Schulkonsole. So at least the "" was always ok. And using it on the command line I can definitely create a project using "_" and "-".
Arnaud: where is the line I could patch this in, do you have the time to point this to me. Since I am pretty sure this will go through, I would want to tell my colleagues that it is already possible (on Wednesday onward).. but no pressure :+1:
Just for the record: I do have several old projects which were migrated from the 6.2 which have the "_" in the name, like p_agbogy and I am 100% sure they were created by collegues through the old Schulkonsole. So at least the "" was always ok. And using it on the command line I can definitely create a project using "_" and "-".
I have tested it this week, and I can confirm, there was no error. I just wanted a confirmation from @jeffbeck, because I don't know all consequences for such a modification.
Arnaud: where is the line I could patch this in, do you have the time to point this to me. Since I am pretty sure this will go through, I would want to tell my colleagues that it is already possible (on Wednesday onward).. but no pressure
Here : https://github.com/linuxmuster/linuxmuster-webui7/blob/d1c3e5723c470031f10ef6190fe1df91b5e37e02/usr/lib/linuxmuster-webui/plugins/lmn_common/resources/build/all.js#L412 I think adding "_-" in the regexp would do the job. It would be nice to have a feedback about it.
Yes, this works:
error_msg = name + gettext(' can only contain lowercase chars, numbers or one of "_-" ');
regExp = /^[a-z0-9_-]*$/;
only with "-" or only with "_" in it or with both of them in there.
even when you start with a hyphen like "-test" ...
Ok, thanks, but you should escape the hyphen in the regexp.
Ok. I escaped the "-". It is a little weird to start a project name with a "-", but it does work in the Schulkonsole and in the command line.
BTW, the fixes / workarounds for
do also work perfectly. I have patched them manually.
BTW, My packages are:
linuxmuster-webui7:
Installiert: 1.0.148-1
Installationskandidat: 1.0.148-1
Versionstabelle:
*** 1.0.148-1 500
500 https://archive.linuxmuster.net lmn7/ Packages
100 /var/lib/dpkg/status
1.0.144-1 1
1 https://archive.linuxmuster.net lmn7-testing/ Packages
Two more "oh I don't get this"
there is a file "validation.service.coffee' which does also some kind of validation https://github.com/linuxmuster/linuxmuster-webui7/blob/d1c3e5723c470031f10ef6190fe1df91b5e37e02/usr/lib/linuxmuster-webui/plugins/lmn_common/resources/js/validation.service.coffee#L43 is this the source code, and I edited the already-built-code?
the string and the translation needs to be updated, if I knew where, I could help do that. I manually edited the string, then the .po file and then the app.js file. My guess is, that the .po file is the source and the .js is the built-code.
BTW, My packages are:
I still cannot update the deb database, we have to wait until the others have time for this.
is this the source code, and I edited the already-built-code?
Exactly.
- the string and the translation needs to be updated, if I knew where, I could help do that. I manually edited the string, then the .po file and then the app.js file. My guess is, that the .po file is the source and the .js is the built-code.
That's the wrong approach. I did a translation update this week, not published. To modify / correct a translation, please do it there : https://crowdin.com/project/linuxmusternet, and then we retrieve the new strings.
It is not very comfortable to name projects like this, e.g. "9bcnwt", "9ablatein"
workaround "latein9ab" is no very much better.