Just a shot in the dark here, but i’m assuming \n is just a newline and that the UI is ignoring it in that context. That would also explain why it displays as if it’s missing a period - because it was intended to be 2 sentence fragments on separate lines, instead of a small paragraph with punctuation.
No, just the .pot file should be changed, the translated .po files will be pulled by a script (pull_from_transifex.sh) from transifex
Yes, normally a \n is a newline which is why I’m confused as to why it’s not being treated that way.
I’m so glad to hear that - 'cause my test of updating every instance resulting in a working tray icon but a dead web interface.
Well when I said
and that the UI is ignoring it in that context.
I was attempting to propose (guess at) an answer - some text renderers (depending on the UI and usage) simply ignore newlines, stripping out all extra whitespace etc. Sometimes you just need to accept and move along, in my experience
The \n
is not displayed in HTML, it needs to be a <br />
. The library angular-gettext is used to translated stuff, so I am not sure if the best approach is to inject some \n
to <br />
automatically or if the better solution is just to change the string.
That was my working theory that I was going to test as soon as I got this darn period to show up where I want it!
OK - I managed to break my installation somehow. The initial build (no local updates) I did worked fine, but every build after that has compiled and Duplicati.GUI.TrayIcon.exe executed but I just end up with a “red-X” icon in the tray, a blank “waiting for localhost…” browser window at http://localhost:8200/index.html, and a log saying:
2017-09-14 21:57:54Z - Information: Server has started and is listening on 127.0.0.1, port 8200
2017-09-14 21:57:54Z - Information: Server has started and is listening on 127.0.0.1, port 8200
Any hints on how to go about debugging this situation?
The tray-icon also connects to the server, so unless you have a breakpoint in the code, the browser should load as well.
Could it be a firewall or a browser plugin/security that prevents it?
There shouldn’t be - my regular installs (tested both user and service) work fine. When the log says “service listening at port xxxx” I assume that is a record of the service starting and not just where the client is listening, correct?
It’s possible the service starts then dies leaving the browser window hanging - that would explain the “red-x” tray icon, right?
When I get back to it I’ll try to verify by checking the task list, event log, and port usage - if I can remember the command.
Nope. The tray-icon should go away if the process dies. And the tray-icon crashes if the server does.
Thanks, port checking here I come!
Sorry for all this “on-boarding” overhead, I’m hoping to eventually be able to help out with minor fixes and hand-holding of other wanna-be developers so you can focus on the big stuff.
Success! Of sorts - by changing the .pot AND backupEditUri.js files I got the period to show in English, but in testing other languages the text I touched now ALWAYS comes up English and (as expected) updating the individual .po files doesn’t fix it.
Is the pull_from_transifex.sh script something I run (and if so, how do I do it) or does that happen somewhere else in the flow?
IIRC, you need to run the compile_all.sh
script to build the .po
files. @agrajaghh set it up, so he can correct me .
yep, there are four scripts:
- extract_all.sh is creating the localization.pot and localization_webroot.pot files by searching all the strings in the code
- push_source_files_to_transifex.sh is uploading the .pot files to transifex, so the translators are seeing new/changed strings
- pull_from_transifex.sh is downloading the translated strings (.po files) from transifex
- compile_all.sh is compiling the localization-xx.po files into .mo files which are used on runtime for the cli texts and the localization_webroot-xx.po files into angular-gettext-cli_compiled_js_output.js which is used by the webinterface
Thanks for the script summary!
- These appear to be bash shell scripts so I assume I need to run them in a Linux / Unix / BSD environment - will they work in Cygwin or the Windows 10 Linux Subsystem (How to Install and Use the Linux Bash Shell on Windows 10)?
- Am I correct in assuming that running these is a manual step and not part of the VS Solution build?
And thanks yet-again for all the hand-holding here.
-
Yes, they are *nix only. The subsystem should actually work.
Alternatively, maybe look inside and see if you can replicate what they do on Windows. -
Yes, we (that is mostly @agrajaghh) run them once in a while to sync with transifex.
I’m running them with the bash that comes with git on windows
Well apparently I’m a sadist so finally after one long and annoying Windows 10 update I got the subsystem installed, tried running ./extract_all.sh and…
me@mymachine: ./extract_all.sh
./duplicati/extract.sh: line 14: xgettext: command not found
./webroot/extract.sh: line 6: angular-gettext-cli: command not found
Sigh. I expect it’ll run just fine on one of my Linux VMs.
It’s not that I want to take over translation processing or anything - I just want to “fully” test my single period change.
I’m waiting for the first post about installing the .deb package or using Linux paths on Windows…
For those that might still want to play around with it…
The Windows 10 'bash' installation text
Microsoft Windows [Version 10.0.15063]
© 2017 Microsoft Corporation. All rights reserved.
C:\Users\me>bash
– Beta feature –
This will install Ubuntu on Windows, distributed by Canonical
and licensed under its terms available here:
Licensing | About Ubuntu | Ubuntu
Type “y” to continue: y
Downloading from the Windows Store… 100%
Extracting filesystem, this will take a few minutes…
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: Linux User Account and Permissions | Microsoft Docs
Enter new UNIX username: me
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Installation successful!
The environment will start momentarily…
Documentation is available at: https://aka.ms/wsldocs
To run a command as administrator (user “root”), use "sudo ".
See “man sudo_root” for details.
me@myPC:/mnt/c/Users/me$
I remember something about being able to apt-get install xgettext
from the Windows subsystem?
I’m using these windows binaries:
plus node.js with this:
not sure if you can run them from the windows subsystem? Otherwise Ken’s probposal sounds good…