BrowseUserManual.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. * Copyright (c) 2011-2018 by Andrew Mustun. All rights reserved.
  3. *
  4. * This file is part of the QCAD project.
  5. *
  6. * QCAD is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * QCAD is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with QCAD.
  18. */
  19. include("scripts/Help/Help.js");
  20. function BrowseUserManual(guiAction) {
  21. Help.call(this, guiAction);
  22. }
  23. BrowseUserManual.prototype = new Help();
  24. BrowseUserManual.prototype.beginEvent = function() {
  25. Help.prototype.beginEvent.call(this);
  26. var locale = new QLocale(RSettings.getLocale());
  27. var dir = "en";
  28. if (locale.language()===QLocale.German) {
  29. dir = "de";
  30. }
  31. else if (locale.language()===QLocale.Danish) {
  32. dir = "da";
  33. }
  34. else if (locale.language()===QLocale.Dutch) {
  35. dir = "nl";
  36. }
  37. else if (locale.language()===QLocale.French) {
  38. dir = "fr";
  39. }
  40. else if (locale.language()===QLocale.Italian) {
  41. dir = "it";
  42. }
  43. else if (locale.language()===QLocale.Spanish) {
  44. dir = "es";
  45. }
  46. else if (locale.language()===QLocale.Portuguese) {
  47. dir = "pt";
  48. }
  49. else if (locale.language()===QLocale.Polish) {
  50. dir = "pl";
  51. }
  52. else if (locale.language()===QLocale.Japanese) {
  53. dir = "ja";
  54. }
  55. else if (locale.language()===QLocale.Slovenian) {
  56. dir = "sl";
  57. }
  58. Help.openUrl(
  59. "https://qcad.org/doc/qcad/%1.%2.%3/reference/%4/index.html"
  60. .arg(RSettings.getMajorVersion())
  61. .arg(RSettings.getMinorVersion())
  62. .arg(RSettings.getRevisionVersion())
  63. .arg(dir)
  64. );
  65. };