Emacs has an ususual way of escaping special characters in regular expressions, which I keep forgetting, so here's a summary
| Literal | Special | Emacs bare | Emacs escaped |
|---|---|---|---|
* |
\* |
||
| * 0 or more | * |
||
+ |
\+ |
||
| + 1 or more | + |
||
? |
\? |
Emacs has an ususual way of escaping special characters in regular expressions, which I keep forgetting, so here's a summary
| Literal | Special | Emacs bare | Emacs escaped |
|---|---|---|---|
* |
\* |
||
| * 0 or more | * |
||
+ |
\+ |
||
| + 1 or more | + |
||
? |
\? |
If the whole paragraph contains only right-to-left text, it poses no problem. Problems are much likelier to occur if we mix the text directions.
Here I want to write down my knowledge so that the simple parts are easily accessible to beginners, and terms are defined for reference when sorting and solving bugs
TODO: show example fixes to the problems (and note that they may look wrong,
My team got a bug report (bsc#1127563) about misplaced brackets in Arabic translation:
Looking at the first problematic line, "Total System Memory", notice that the Arabic translation has both square brackets in the right-hand version. Let's check the corresponding translations file.
At the first sight we see a matching left+right bracket, but that is misleading, since they are not in the correct place. The GitHub rendering of that line is confused by the `m
| diff --git a/src/clients/inst_kickoff.rb b/src/clients/inst_kickoff.rb | |
| index 581f3554..ba4a2ff4 100644 | |
| --- a/src/clients/inst_kickoff.rb | |
| +++ b/src/clients/inst_kickoff.rb | |
| @@ -78,11 +78,11 @@ module Yast | |
| # make some directories | |
| SCR.Execute( | |
| path(".target.mkdir"), | |
| - Ops.add(Installation.destdir, "/etc") | |
| + Installation.destdir + "/etc" |
| # A crude YaST UI recoder and player | |
| # | |
| # Usage: | |
| # Y2UI_RECORD=/tmp/y2host.yaml LANG=en_US.UTF-8 \ | |
| # ruby -r ./ui_recorder.rb /usr/lib/YaST2/bin/y2start host qt | |
| # less /tmp/y2host.yaml | |
| # Y2UI_PLAY=/tmp/y2host.yaml LANG=en_US.UTF-8 \ | |
| # ruby -r ./ui_recorder.rb /usr/lib/YaST2/bin/y2start host qt | |
| require "set" |
| #!/usr/bin/ruby | |
| CACHE = "find_minimal_failure.cache".freeze | |
| def usage | |
| puts <<TXT | |
| Usage: find_minimal_failure COMMAND [OPTIONS --] ARGUMENTS... | |
| Finds the minimal ordered subsequence of ARGUMENTS that still | |
| makes the command fail. | |
| This is useful in place of "rspec --bisect" | |
| when your extension library crashes without producing an exception. |
This is a clarifying update to the AutoYaST documentation, applicable to all versions.
A resource element either contains multiple and distinct property and resource elements, or multiple instances of the same resource element, or it is empty. The permissible content of a resource element is
| GEM | |
| remote: http://rubygems.org/ | |
| specs: | |
| activemodel (4.2.10) | |
| activesupport (= 4.2.10) | |
| builder (~> 3.1) | |
| activesupport (4.2.10) | |
| i18n (~> 0.7) | |
| minitest (~> 5.1) | |
| thread_safe (~> 0.3, >= 0.3.4) |
| #!/usr/bin/ruby | |
| require "cheetah" | |
| require "yast" | |
| Cheetah.run("ls", "-la", "/var/lib/empty", logger: Yast::Y2Logger.instance) | |
| # another way: "log" becomes a shortcut for Yast::Y2Logger.instance | |
| include Yast::Logger | |
| begin |
| #We have such a Tab, wich has a TargetsTableWidget(A customWidget has a table and buttons), | |
| #TargetsTableWidget would be listed after class TargetsTab | |
| class TargetsTab < ::CWM::Tab | |
| def initialize | |
| @target_table_widget = TargetsTableWidget.new | |
| self.initial = false | |
| end | |
| def contents | |
| VBox( |