Class: PlatformosCheck::LanguageServer::LocalizeDocumentLinkProvider
- Inherits:
-
DocumentLinkProvider
- Object
- DocumentLinkProvider
- PlatformosCheck::LanguageServer::LocalizeDocumentLinkProvider
- Defined in:
- lib/platformos_check/language_server/document_link_providers/localize_document_link_provider.rb
Constant Summary
Constants included from RegexHelpers
RegexHelpers::HTML_LIQUID_PLACEHOLDER, RegexHelpers::LIQUID_TAG, RegexHelpers::LIQUID_TAG_OR_VARIABLE, RegexHelpers::LIQUID_VARIABLE, RegexHelpers::START_OR_END_QUOTE
Instance Method Summary collapse
- #end_coordinates(buffer, match) ⇒ Object
- #file_link(match, platformos_app) ⇒ Object
- #start_coordinates(buffer, match) ⇒ Object
- #translation_components_for_match(match) ⇒ Object
Methods inherited from DocumentLinkProvider
all, #app_file_type, #default_dir, #default_extension, #default_relative_path, #document_links, inherited, #initialize, #partial_regexp, #translation_file_link, #yaml
Methods included from URIHelper
Methods included from PositionHelper
#bounded, #from_index_to_row_column, #from_row_column_to_index
Methods included from RegexHelpers
Constructor Details
This class inherits a constructor from PlatformosCheck::LanguageServer::DocumentLinkProvider
Instance Method Details
#end_coordinates(buffer, match) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/platformos_check/language_server/document_link_providers/localize_document_link_provider.rb', line 30 def end_coordinates(buffer, match) from_index_to_row_column( buffer, match.end(:key) ) end |
#file_link(match, platformos_app) ⇒ Object
11 12 13 |
# File 'lib/platformos_check/language_server/document_link_providers/localize_document_link_provider.rb', line 11 def file_link(match, platformos_app) translation_file_link(match, platformos_app) end |
#start_coordinates(buffer, match) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/platformos_check/language_server/document_link_providers/localize_document_link_provider.rb', line 23 def start_coordinates(buffer, match) from_index_to_row_column( buffer, match.begin(:key) ) end |
#translation_components_for_match(match) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/platformos_check/language_server/document_link_providers/localize_document_link_provider.rb', line 15 def translation_components_for_match(match) key = match[:key].split('.') [ %w[time formats] + key, %w[date formats] + key ] end |