Compare commits

..
4 Commits
Author SHA1 Message Date
Andrey Helldar 6a556442a4 Merge pull request #2096 from mehmetnky/patch-1
[tr] Update missing Turkish translations
2022-03-31 11:09:32 +03:00
Mehmet Can Nokay 9a626c39b3 Updated missing Turkish translations
Translated values of date_equals, starts_with, uuid, gt, gte, lt and lte.
2022-03-30 20:19:42 +03:00
Fred Delrieu b0256d6171 Merge pull request #1815 from skys215/patch-1
Update zh-CN.json
2021-08-12 08:34:41 +02:00
skys215 df67df1d60 Update zh-CN.json
版本所有->版权所有
2021-08-08 01:32:15 +08:00
1187 changed files with 15608 additions and 171237 deletions

No files matched your search

+9 -784
View File
@@ -1,787 +1,12 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 180
tab_width = 4
charset = utf-8
trim_trailing_whitespace = true
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = true
ij_smart_tabs = false
ij_visual_guides = none
ij_wrap_on_typing = false
[*.blade.php]
ij_continuation_indent_size = 4
ij_blade_keep_indents_on_empty_lines = false
[*.css]
ij_css_align_closing_brace_with_properties = false
ij_css_blank_lines_around_nested_selector = 1
ij_css_blank_lines_between_blocks = 1
ij_css_block_comment_add_space = false
ij_css_brace_placement = end_of_line
ij_css_enforce_quotes_on_format = false
ij_css_hex_color_long_format = true
ij_css_hex_color_lower_case = false
ij_css_hex_color_short_format = false
ij_css_hex_color_upper_case = true
ij_css_keep_blank_lines_in_code = 1
ij_css_keep_indents_on_empty_lines = false
ij_css_keep_single_line_blocks = true
ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
ij_css_space_after_colon = true
ij_css_space_before_opening_brace = true
ij_css_use_double_quotes = true
ij_css_value_alignment = do_not_align
[*.haml]
indent_size = 2
ij_haml_keep_indents_on_empty_lines = false
[*.less]
indent_size = 2
ij_less_align_closing_brace_with_properties = false
ij_less_blank_lines_around_nested_selector = 1
ij_less_blank_lines_between_blocks = 1
ij_less_block_comment_add_space = false
ij_less_brace_placement = 0
ij_less_enforce_quotes_on_format = false
ij_less_hex_color_long_format = true
ij_less_hex_color_lower_case = false
ij_less_hex_color_short_format = false
ij_less_hex_color_upper_case = true
ij_less_keep_blank_lines_in_code = 2
ij_less_keep_indents_on_empty_lines = false
ij_less_keep_single_line_blocks = false
ij_less_line_comment_add_space = false
ij_less_line_comment_at_first_column = false
ij_less_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
ij_less_space_after_colon = true
ij_less_space_before_opening_brace = true
ij_less_use_double_quotes = true
ij_less_value_alignment = 0
[*.sass]
indent_size = 2
ij_sass_align_closing_brace_with_properties = false
ij_sass_blank_lines_around_nested_selector = 1
ij_sass_blank_lines_between_blocks = 1
ij_sass_brace_placement = 0
ij_sass_enforce_quotes_on_format = false
ij_sass_hex_color_long_format = false
ij_sass_hex_color_lower_case = false
ij_sass_hex_color_short_format = false
ij_sass_hex_color_upper_case = false
ij_sass_keep_blank_lines_in_code = 2
ij_sass_keep_indents_on_empty_lines = false
ij_sass_keep_single_line_blocks = false
ij_sass_line_comment_add_space = false
ij_sass_line_comment_at_first_column = false
ij_sass_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
ij_sass_space_after_colon = true
ij_sass_space_before_opening_brace = true
ij_sass_use_double_quotes = true
ij_sass_value_alignment = 0
[*.scss]
ij_scss_align_closing_brace_with_properties = false
ij_scss_blank_lines_around_nested_selector = 1
ij_scss_blank_lines_between_blocks = 1
ij_scss_block_comment_add_space = false
ij_scss_brace_placement = 0
ij_scss_enforce_quotes_on_format = true
ij_scss_hex_color_long_format = true
ij_scss_hex_color_lower_case = false
ij_scss_hex_color_short_format = false
ij_scss_hex_color_upper_case = true
ij_scss_keep_blank_lines_in_code = 1
ij_scss_keep_indents_on_empty_lines = false
ij_scss_keep_single_line_blocks = true
ij_scss_line_comment_add_space = false
ij_scss_line_comment_at_first_column = false
ij_scss_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
ij_scss_space_after_colon = true
ij_scss_space_before_opening_brace = true
ij_scss_use_double_quotes = false
ij_scss_value_alignment = 0
[*.twig]
ij_twig_keep_indents_on_empty_lines = false
ij_twig_spaces_inside_comments_delimiters = true
ij_twig_spaces_inside_delimiters = true
ij_twig_spaces_inside_variable_delimiters = true
[*.vue]
ij_continuation_indent_size = 4
ij_vue_indent_children_of_top_level = template
ij_vue_interpolation_new_line_after_start_delimiter = true
ij_vue_interpolation_new_line_before_end_delimiter = true
ij_vue_interpolation_wrap = off
ij_vue_keep_indents_on_empty_lines = false
ij_vue_spaces_within_interpolation_expressions = true
[.editorconfig]
ij_editorconfig_align_group_field_declarations = false
ij_editorconfig_space_after_colon = false
ij_editorconfig_space_after_comma = true
ij_editorconfig_space_before_colon = false
ij_editorconfig_space_before_comma = false
ij_editorconfig_spaces_around_assignment_operators = true
[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.rng,*.tld,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul,phpunit.xml.dist}]
ij_xml_align_attributes = true
ij_xml_align_text = false
ij_xml_attribute_wrap = normal
ij_xml_block_comment_add_space = true
ij_xml_block_comment_at_first_column = true
ij_xml_keep_blank_lines = 2
ij_xml_keep_indents_on_empty_lines = false
ij_xml_keep_line_breaks = true
ij_xml_keep_line_breaks_in_text = true
ij_xml_keep_whitespaces = false
ij_xml_keep_whitespaces_around_cdata = preserve
ij_xml_keep_whitespaces_inside_cdata = false
ij_xml_line_comment_at_first_column = true
ij_xml_space_after_tag_name = false
ij_xml_space_around_equals_in_attribute = false
ij_xml_space_inside_empty_tag = true
ij_xml_text_wrap = normal
[{*.ats,*.cts,*.mts,*.ts}]
ij_continuation_indent_size = 4
ij_typescript_align_imports = false
ij_typescript_align_multiline_array_initializer_expression = false
ij_typescript_align_multiline_binary_operation = false
ij_typescript_align_multiline_chained_methods = false
ij_typescript_align_multiline_extends_list = false
ij_typescript_align_multiline_for = true
ij_typescript_align_multiline_parameters = true
ij_typescript_align_multiline_parameters_in_calls = false
ij_typescript_align_multiline_ternary_operation = false
ij_typescript_align_object_properties = 0
ij_typescript_align_union_types = false
ij_typescript_align_var_statements = 0
ij_typescript_array_initializer_new_line_after_left_brace = false
ij_typescript_array_initializer_right_brace_on_new_line = false
ij_typescript_array_initializer_wrap = off
ij_typescript_assignment_wrap = off
ij_typescript_binary_operation_sign_on_next_line = false
ij_typescript_binary_operation_wrap = off
ij_typescript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/**
ij_typescript_blank_lines_after_imports = 1
ij_typescript_blank_lines_around_class = 1
ij_typescript_blank_lines_around_field = 0
ij_typescript_blank_lines_around_field_in_interface = 0
ij_typescript_blank_lines_around_function = 1
ij_typescript_blank_lines_around_method = 1
ij_typescript_blank_lines_around_method_in_interface = 1
ij_typescript_block_brace_style = end_of_line
ij_typescript_block_comment_add_space = false
ij_typescript_block_comment_at_first_column = true
ij_typescript_call_parameters_new_line_after_left_paren = false
ij_typescript_call_parameters_right_paren_on_new_line = false
ij_typescript_call_parameters_wrap = off
ij_typescript_catch_on_new_line = false
ij_typescript_chained_call_dot_on_new_line = true
ij_typescript_class_brace_style = end_of_line
ij_typescript_comma_on_new_line = false
ij_typescript_do_while_brace_force = never
ij_typescript_else_on_new_line = false
ij_typescript_enforce_trailing_comma = keep
ij_typescript_enum_constants_wrap = on_every_item
ij_typescript_extends_keyword_wrap = off
ij_typescript_extends_list_wrap = off
ij_typescript_field_prefix = _
ij_typescript_file_name_style = relaxed
ij_typescript_finally_on_new_line = false
ij_typescript_for_brace_force = never
ij_typescript_for_statement_new_line_after_left_paren = false
ij_typescript_for_statement_right_paren_on_new_line = false
ij_typescript_for_statement_wrap = off
ij_typescript_force_quote_style = false
ij_typescript_force_semicolon_style = false
ij_typescript_function_expression_brace_style = end_of_line
ij_typescript_if_brace_force = never
ij_typescript_import_merge_members = global
ij_typescript_import_prefer_absolute_path = global
ij_typescript_import_sort_members = true
ij_typescript_import_sort_module_name = false
ij_typescript_import_use_node_resolution = true
ij_typescript_imports_wrap = on_every_item
ij_typescript_indent_case_from_switch = true
ij_typescript_indent_chained_calls = true
ij_typescript_indent_package_children = 0
ij_typescript_jsdoc_include_types = false
ij_typescript_jsx_attribute_value = braces
ij_typescript_keep_blank_lines_in_code = 2
ij_typescript_keep_first_column_comment = true
ij_typescript_keep_indents_on_empty_lines = false
ij_typescript_keep_line_breaks = true
ij_typescript_keep_simple_blocks_in_one_line = false
ij_typescript_keep_simple_methods_in_one_line = false
ij_typescript_line_comment_add_space = true
ij_typescript_line_comment_at_first_column = false
ij_typescript_method_brace_style = end_of_line
ij_typescript_method_call_chain_wrap = off
ij_typescript_method_parameters_new_line_after_left_paren = false
ij_typescript_method_parameters_right_paren_on_new_line = false
ij_typescript_method_parameters_wrap = off
ij_typescript_object_literal_wrap = on_every_item
ij_typescript_parentheses_expression_new_line_after_left_paren = false
ij_typescript_parentheses_expression_right_paren_on_new_line = false
ij_typescript_place_assignment_sign_on_next_line = false
ij_typescript_prefer_as_type_cast = false
ij_typescript_prefer_explicit_types_function_expression_returns = false
ij_typescript_prefer_explicit_types_function_returns = false
ij_typescript_prefer_explicit_types_vars_fields = false
ij_typescript_prefer_parameters_wrap = false
ij_typescript_reformat_c_style_comments = false
ij_typescript_space_after_colon = true
ij_typescript_space_after_comma = true
ij_typescript_space_after_dots_in_rest_parameter = false
ij_typescript_space_after_generator_mult = true
ij_typescript_space_after_property_colon = true
ij_typescript_space_after_quest = true
ij_typescript_space_after_type_colon = true
ij_typescript_space_after_unary_not = false
ij_typescript_space_before_async_arrow_lparen = true
ij_typescript_space_before_catch_keyword = true
ij_typescript_space_before_catch_left_brace = true
ij_typescript_space_before_catch_parentheses = true
ij_typescript_space_before_class_lbrace = true
ij_typescript_space_before_class_left_brace = true
ij_typescript_space_before_colon = true
ij_typescript_space_before_comma = false
ij_typescript_space_before_do_left_brace = true
ij_typescript_space_before_else_keyword = true
ij_typescript_space_before_else_left_brace = true
ij_typescript_space_before_finally_keyword = true
ij_typescript_space_before_finally_left_brace = true
ij_typescript_space_before_for_left_brace = true
ij_typescript_space_before_for_parentheses = true
ij_typescript_space_before_for_semicolon = false
ij_typescript_space_before_function_left_parenth = true
ij_typescript_space_before_generator_mult = false
ij_typescript_space_before_if_left_brace = true
ij_typescript_space_before_if_parentheses = true
ij_typescript_space_before_method_call_parentheses = false
ij_typescript_space_before_method_left_brace = true
ij_typescript_space_before_method_parentheses = false
ij_typescript_space_before_property_colon = false
ij_typescript_space_before_quest = true
ij_typescript_space_before_switch_left_brace = true
ij_typescript_space_before_switch_parentheses = true
ij_typescript_space_before_try_left_brace = true
ij_typescript_space_before_type_colon = false
ij_typescript_space_before_unary_not = false
ij_typescript_space_before_while_keyword = true
ij_typescript_space_before_while_left_brace = true
ij_typescript_space_before_while_parentheses = true
ij_typescript_spaces_around_additive_operators = true
ij_typescript_spaces_around_arrow_function_operator = true
ij_typescript_spaces_around_assignment_operators = true
ij_typescript_spaces_around_bitwise_operators = true
ij_typescript_spaces_around_equality_operators = true
ij_typescript_spaces_around_logical_operators = true
ij_typescript_spaces_around_multiplicative_operators = true
ij_typescript_spaces_around_relational_operators = true
ij_typescript_spaces_around_shift_operators = true
ij_typescript_spaces_around_unary_operator = false
ij_typescript_spaces_within_array_initializer_brackets = false
ij_typescript_spaces_within_brackets = false
ij_typescript_spaces_within_catch_parentheses = false
ij_typescript_spaces_within_for_parentheses = false
ij_typescript_spaces_within_if_parentheses = false
ij_typescript_spaces_within_imports = false
ij_typescript_spaces_within_interpolation_expressions = false
ij_typescript_spaces_within_method_call_parentheses = false
ij_typescript_spaces_within_method_parentheses = false
ij_typescript_spaces_within_object_literal_braces = false
ij_typescript_spaces_within_object_type_braces = true
ij_typescript_spaces_within_parentheses = false
ij_typescript_spaces_within_switch_parentheses = false
ij_typescript_spaces_within_type_assertion = false
ij_typescript_spaces_within_union_types = true
ij_typescript_spaces_within_while_parentheses = false
ij_typescript_special_else_if_treatment = true
ij_typescript_ternary_operation_signs_on_next_line = false
ij_typescript_ternary_operation_wrap = off
ij_typescript_union_types_wrap = on_every_item
ij_typescript_use_chained_calls_group_indents = false
ij_typescript_use_double_quotes = true
ij_typescript_use_explicit_js_extension = auto
ij_typescript_use_path_mapping = always
ij_typescript_use_public_modifier = false
ij_typescript_use_semicolon_after_statement = true
ij_typescript_var_declaration_wrap = normal
ij_typescript_while_brace_force = never
ij_typescript_while_on_new_line = false
ij_typescript_wrap_comments = false
[{*.bash,*.sh,*.zsh}]
ij_shell_binary_ops_start_line = false
ij_shell_keep_column_alignment_padding = false
ij_shell_minify_program = false
ij_shell_redirect_followed_by_space = false
ij_shell_switch_cases_indented = false
ij_shell_use_unix_line_separator = true
[{*.cjs,*.js}]
ij_continuation_indent_size = 4
ij_javascript_align_imports = false
ij_javascript_align_multiline_array_initializer_expression = false
ij_javascript_align_multiline_binary_operation = false
ij_javascript_align_multiline_chained_methods = false
ij_javascript_align_multiline_extends_list = false
ij_javascript_align_multiline_for = true
ij_javascript_align_multiline_parameters = true
ij_javascript_align_multiline_parameters_in_calls = false
ij_javascript_align_multiline_ternary_operation = false
ij_javascript_align_object_properties = 0
ij_javascript_align_union_types = false
ij_javascript_align_var_statements = 1
ij_javascript_array_initializer_new_line_after_left_brace = true
ij_javascript_array_initializer_right_brace_on_new_line = true
ij_javascript_array_initializer_wrap = on_every_item
ij_javascript_assignment_wrap = off
ij_javascript_binary_operation_sign_on_next_line = false
ij_javascript_binary_operation_wrap = off
ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/**
ij_javascript_blank_lines_after_imports = 1
ij_javascript_blank_lines_around_class = 1
ij_javascript_blank_lines_around_field = 0
ij_javascript_blank_lines_around_function = 1
ij_javascript_blank_lines_around_method = 1
ij_javascript_block_brace_style = end_of_line
ij_javascript_block_comment_add_space = false
ij_javascript_block_comment_at_first_column = true
ij_javascript_call_parameters_new_line_after_left_paren = false
ij_javascript_call_parameters_right_paren_on_new_line = false
ij_javascript_call_parameters_wrap = off
ij_javascript_catch_on_new_line = false
ij_javascript_chained_call_dot_on_new_line = true
ij_javascript_class_brace_style = next_line
ij_javascript_comma_on_new_line = false
ij_javascript_do_while_brace_force = never
ij_javascript_else_on_new_line = false
ij_javascript_enforce_trailing_comma = remove
ij_javascript_extends_keyword_wrap = off
ij_javascript_extends_list_wrap = off
ij_javascript_field_prefix = _
ij_javascript_file_name_style = lisp_case
ij_javascript_finally_on_new_line = false
ij_javascript_for_brace_force = never
ij_javascript_for_statement_new_line_after_left_paren = false
ij_javascript_for_statement_right_paren_on_new_line = false
ij_javascript_for_statement_wrap = off
ij_javascript_force_quote_style = true
ij_javascript_force_semicolon_style = true
ij_javascript_function_expression_brace_style = end_of_line
ij_javascript_if_brace_force = never
ij_javascript_import_merge_members = global
ij_javascript_import_prefer_absolute_path = true
ij_javascript_import_sort_members = true
ij_javascript_import_sort_module_name = false
ij_javascript_import_use_node_resolution = true
ij_javascript_imports_wrap = on_every_item
ij_javascript_indent_case_from_switch = true
ij_javascript_indent_chained_calls = true
ij_javascript_indent_package_children = 0
ij_javascript_jsx_attribute_value = braces
ij_javascript_keep_blank_lines_in_code = 2
ij_javascript_keep_first_column_comment = true
ij_javascript_keep_indents_on_empty_lines = false
ij_javascript_keep_line_breaks = true
ij_javascript_keep_simple_blocks_in_one_line = false
ij_javascript_keep_simple_methods_in_one_line = false
ij_javascript_line_comment_add_space = false
ij_javascript_line_comment_at_first_column = false
ij_javascript_method_brace_style = end_of_line
ij_javascript_method_call_chain_wrap = off
ij_javascript_method_parameters_new_line_after_left_paren = false
ij_javascript_method_parameters_right_paren_on_new_line = false
ij_javascript_method_parameters_wrap = off
ij_javascript_object_literal_wrap = on_every_item
ij_javascript_parentheses_expression_new_line_after_left_paren = false
ij_javascript_parentheses_expression_right_paren_on_new_line = false
ij_javascript_place_assignment_sign_on_next_line = false
ij_javascript_prefer_as_type_cast = false
ij_javascript_prefer_explicit_types_function_expression_returns = false
ij_javascript_prefer_explicit_types_function_returns = false
ij_javascript_prefer_explicit_types_vars_fields = false
ij_javascript_prefer_parameters_wrap = false
ij_javascript_reformat_c_style_comments = false
ij_javascript_space_after_colon = true
ij_javascript_space_after_comma = true
ij_javascript_space_after_dots_in_rest_parameter = false
ij_javascript_space_after_generator_mult = true
ij_javascript_space_after_property_colon = true
ij_javascript_space_after_quest = true
ij_javascript_space_after_type_colon = true
ij_javascript_space_after_unary_not = true
ij_javascript_space_before_async_arrow_lparen = true
ij_javascript_space_before_catch_keyword = true
ij_javascript_space_before_catch_left_brace = true
ij_javascript_space_before_catch_parentheses = true
ij_javascript_space_before_class_lbrace = true
ij_javascript_space_before_class_left_brace = true
ij_javascript_space_before_colon = true
ij_javascript_space_before_comma = false
ij_javascript_space_before_do_left_brace = true
ij_javascript_space_before_else_keyword = true
ij_javascript_space_before_else_left_brace = true
ij_javascript_space_before_finally_keyword = true
ij_javascript_space_before_finally_left_brace = true
ij_javascript_space_before_for_left_brace = true
ij_javascript_space_before_for_parentheses = true
ij_javascript_space_before_for_semicolon = false
ij_javascript_space_before_function_left_parenth = true
ij_javascript_space_before_generator_mult = false
ij_javascript_space_before_if_left_brace = true
ij_javascript_space_before_if_parentheses = true
ij_javascript_space_before_method_call_parentheses = false
ij_javascript_space_before_method_left_brace = true
ij_javascript_space_before_method_parentheses = false
ij_javascript_space_before_property_colon = false
ij_javascript_space_before_quest = true
ij_javascript_space_before_switch_left_brace = true
ij_javascript_space_before_switch_parentheses = true
ij_javascript_space_before_try_left_brace = true
ij_javascript_space_before_type_colon = false
ij_javascript_space_before_unary_not = false
ij_javascript_space_before_while_keyword = true
ij_javascript_space_before_while_left_brace = true
ij_javascript_space_before_while_parentheses = true
ij_javascript_spaces_around_additive_operators = true
ij_javascript_spaces_around_arrow_function_operator = true
ij_javascript_spaces_around_assignment_operators = true
ij_javascript_spaces_around_bitwise_operators = true
ij_javascript_spaces_around_equality_operators = true
ij_javascript_spaces_around_logical_operators = true
ij_javascript_spaces_around_multiplicative_operators = true
ij_javascript_spaces_around_relational_operators = true
ij_javascript_spaces_around_shift_operators = true
ij_javascript_spaces_around_unary_operator = false
ij_javascript_spaces_within_array_initializer_brackets = false
ij_javascript_spaces_within_brackets = false
ij_javascript_spaces_within_catch_parentheses = false
ij_javascript_spaces_within_for_parentheses = false
ij_javascript_spaces_within_if_parentheses = false
ij_javascript_spaces_within_imports = true
ij_javascript_spaces_within_interpolation_expressions = true
ij_javascript_spaces_within_method_call_parentheses = false
ij_javascript_spaces_within_method_parentheses = false
ij_javascript_spaces_within_object_literal_braces = true
ij_javascript_spaces_within_object_type_braces = true
ij_javascript_spaces_within_parentheses = false
ij_javascript_spaces_within_switch_parentheses = false
ij_javascript_spaces_within_type_assertion = false
ij_javascript_spaces_within_union_types = true
ij_javascript_spaces_within_while_parentheses = false
ij_javascript_special_else_if_treatment = true
ij_javascript_ternary_operation_signs_on_next_line = false
ij_javascript_ternary_operation_wrap = off
ij_javascript_union_types_wrap = on_every_item
ij_javascript_use_chained_calls_group_indents = true
ij_javascript_use_double_quotes = false
ij_javascript_use_explicit_js_extension = auto
ij_javascript_use_path_mapping = always
ij_javascript_use_public_modifier = false
ij_javascript_use_semicolon_after_statement = true
ij_javascript_var_declaration_wrap = on_every_item
ij_javascript_while_brace_force = never
ij_javascript_while_on_new_line = false
ij_javascript_wrap_comments = false
[{*.ctp,*.hphp,*.inc,*.module,*.php,*.php4,*.php5,*.phtml}]
ij_continuation_indent_size = 4
ij_php_align_assignments = true
ij_php_align_class_constants = false
ij_php_align_group_field_declarations = false
ij_php_align_inline_comments = true
ij_php_align_key_value_pairs = true
ij_php_align_match_arm_bodies = true
ij_php_align_multiline_array_initializer_expression = true
ij_php_align_multiline_binary_operation = true
ij_php_align_multiline_chained_methods = false
ij_php_align_multiline_extends_list = true
ij_php_align_multiline_for = false
ij_php_align_multiline_parameters = true
ij_php_align_multiline_parameters_in_calls = false
ij_php_align_multiline_ternary_operation = false
ij_php_align_named_arguments = true
ij_php_align_phpdoc_comments = false
ij_php_align_phpdoc_param_names = false
ij_php_anonymous_brace_style = end_of_line
ij_php_api_weight = 28
ij_php_array_initializer_new_line_after_left_brace = true
ij_php_array_initializer_right_brace_on_new_line = true
ij_php_array_initializer_wrap = on_every_item
ij_php_assignment_wrap = on_every_item
ij_php_attributes_wrap = split_into_lines
ij_php_author_weight = 4
ij_php_binary_operation_sign_on_next_line = true
ij_php_binary_operation_wrap = on_every_item
ij_php_blank_lines_after_class_header = 0
ij_php_blank_lines_after_function = 1
ij_php_blank_lines_after_imports = 1
ij_php_blank_lines_after_opening_tag = 1
ij_php_blank_lines_after_package = 1
ij_php_blank_lines_around_class = 1
ij_php_blank_lines_around_constants = 1
ij_php_blank_lines_around_field = 1
ij_php_blank_lines_around_method = 1
ij_php_blank_lines_before_class_end = 0
ij_php_blank_lines_before_imports = 1
ij_php_blank_lines_before_method_body = 0
ij_php_blank_lines_before_package = 1
ij_php_blank_lines_before_return_statement = 1
ij_php_blank_lines_between_imports = 1
ij_php_block_brace_style = end_of_line
ij_php_call_parameters_new_line_after_left_paren = false
ij_php_call_parameters_right_paren_on_new_line = false
ij_php_call_parameters_wrap = on_every_item
ij_php_catch_on_new_line = false
ij_php_category_weight = 28
ij_php_class_brace_style = next_line
ij_php_comma_after_last_array_element = true
ij_php_concat_spaces = true
ij_php_copyright_weight = 28
ij_php_deprecated_weight = 0
ij_php_do_while_brace_force = always
ij_php_else_if_style = combine
ij_php_else_on_new_line = false
ij_php_example_weight = 28
ij_php_extends_keyword_wrap = normal
ij_php_extends_list_wrap = off
ij_php_fields_default_visibility = protected
ij_php_filesource_weight = 28
ij_php_finally_on_new_line = false
ij_php_for_brace_force = always
ij_php_for_statement_new_line_after_left_paren = false
ij_php_for_statement_right_paren_on_new_line = false
ij_php_for_statement_wrap = normal
ij_php_force_empty_methods_in_one_line = false
ij_php_force_short_declaration_array_style = true
ij_php_getters_setters_naming_style = camel_case
ij_php_getters_setters_order_style = getters_first
ij_php_global_weight = 28
ij_php_group_use_wrap = on_every_item
ij_php_if_brace_force = if_multiline
ij_php_if_lparen_on_next_line = true
ij_php_if_rparen_on_next_line = true
ij_php_ignore_weight = 28
ij_php_import_sorting = alphabetic
ij_php_indent_break_from_case = true
ij_php_indent_case_from_switch = true
ij_php_indent_code_in_php_tags = false
ij_php_internal_weight = 28
ij_php_keep_blank_lines_after_lbrace = 1
ij_php_keep_blank_lines_before_right_brace = 0
ij_php_keep_blank_lines_in_code = 1
ij_php_keep_blank_lines_in_declarations = 0
ij_php_keep_control_statement_in_one_line = true
ij_php_keep_first_column_comment = false
ij_php_keep_indents_on_empty_lines = false
ij_php_keep_line_breaks = true
ij_php_keep_rparen_and_lbrace_on_one_line = true
ij_php_keep_simple_classes_in_one_line = true
ij_php_keep_simple_methods_in_one_line = false
ij_php_lambda_brace_style = end_of_line
ij_php_license_weight = 28
ij_php_line_comment_add_space = false
ij_php_line_comment_at_first_column = false
ij_php_link_weight = 3
ij_php_lower_case_boolean_const = true
ij_php_lower_case_keywords = true
ij_php_lower_case_null_const = true
ij_php_method_brace_style = next_line
ij_php_method_call_chain_wrap = on_every_item
ij_php_method_parameters_new_line_after_left_paren = true
ij_php_method_parameters_right_paren_on_new_line = true
ij_php_method_parameters_wrap = on_every_item
ij_php_method_weight = 10
ij_php_modifier_list_wrap = false
ij_php_multiline_chained_calls_semicolon_on_new_line = false
ij_php_namespace_brace_style = 2
ij_php_new_line_after_php_opening_tag = true
ij_php_null_type_position = in_the_end
ij_php_package_weight = 28
ij_php_param_weight = 6
ij_php_parameters_attributes_wrap = split_into_lines
ij_php_parentheses_expression_new_line_after_left_paren = false
ij_php_parentheses_expression_right_paren_on_new_line = false
ij_php_phpdoc_blank_line_before_tags = true
ij_php_phpdoc_blank_lines_around_parameters = true
ij_php_phpdoc_keep_blank_lines = true
ij_php_phpdoc_param_spaces_between_name_and_description = 1
ij_php_phpdoc_param_spaces_between_tag_and_type = 1
ij_php_phpdoc_param_spaces_between_type_and_name = 1
ij_php_phpdoc_use_fqcn = true
ij_php_phpdoc_wrap_long_lines = true
ij_php_place_assignment_sign_on_next_line = false
ij_php_place_parens_for_constructor = 0
ij_php_property_read_weight = 8
ij_php_property_weight = 7
ij_php_property_write_weight = 9
ij_php_return_type_on_new_line = false
ij_php_return_weight = 12
ij_php_see_weight = 2
ij_php_since_weight = 1
ij_php_sort_phpdoc_elements = true
ij_php_space_after_colon = true
ij_php_space_after_colon_in_enum_backed_type = true
ij_php_space_after_colon_in_named_argument = true
ij_php_space_after_colon_in_return_type = true
ij_php_space_after_comma = true
ij_php_space_after_for_semicolon = true
ij_php_space_after_quest = true
ij_php_space_after_type_cast = true
ij_php_space_after_unary_not = true
ij_php_space_before_array_initializer_left_brace = true
ij_php_space_before_catch_keyword = true
ij_php_space_before_catch_left_brace = true
ij_php_space_before_catch_parentheses = true
ij_php_space_before_class_left_brace = true
ij_php_space_before_closure_left_parenthesis = true
ij_php_space_before_colon = true
ij_php_space_before_colon_in_enum_backed_type = false
ij_php_space_before_colon_in_named_argument = false
ij_php_space_before_colon_in_return_type = false
ij_php_space_before_comma = false
ij_php_space_before_do_left_brace = true
ij_php_space_before_else_keyword = true
ij_php_space_before_else_left_brace = true
ij_php_space_before_finally_keyword = true
ij_php_space_before_finally_left_brace = true
ij_php_space_before_for_left_brace = true
ij_php_space_before_for_parentheses = true
ij_php_space_before_for_semicolon = false
ij_php_space_before_if_left_brace = true
ij_php_space_before_if_parentheses = true
ij_php_space_before_method_call_parentheses = false
ij_php_space_before_method_left_brace = true
ij_php_space_before_method_parentheses = false
ij_php_space_before_quest = true
ij_php_space_before_short_closure_left_parenthesis = true
ij_php_space_before_switch_left_brace = true
ij_php_space_before_switch_parentheses = true
ij_php_space_before_try_left_brace = true
ij_php_space_before_unary_not = false
ij_php_space_before_while_keyword = true
ij_php_space_before_while_left_brace = true
ij_php_space_before_while_parentheses = true
ij_php_space_between_ternary_quest_and_colon = false
ij_php_spaces_around_additive_operators = true
ij_php_spaces_around_arrow = false
ij_php_spaces_around_assignment_in_declare = false
ij_php_spaces_around_assignment_operators = true
ij_php_spaces_around_bitwise_operators = true
ij_php_spaces_around_equality_operators = true
ij_php_spaces_around_logical_operators = true
ij_php_spaces_around_multiplicative_operators = true
ij_php_spaces_around_null_coalesce_operator = true
ij_php_spaces_around_pipe_in_union_type = false
ij_php_spaces_around_relational_operators = true
ij_php_spaces_around_shift_operators = true
ij_php_spaces_around_unary_operator = false
ij_php_spaces_around_var_within_brackets = false
ij_php_spaces_within_array_initializer_braces = false
ij_php_spaces_within_brackets = false
ij_php_spaces_within_catch_parentheses = false
ij_php_spaces_within_for_parentheses = false
ij_php_spaces_within_if_parentheses = false
ij_php_spaces_within_method_call_parentheses = false
ij_php_spaces_within_method_parentheses = false
ij_php_spaces_within_parentheses = false
ij_php_spaces_within_short_echo_tags = true
ij_php_spaces_within_switch_parentheses = false
ij_php_spaces_within_while_parentheses = false
ij_php_special_else_if_treatment = false
ij_php_subpackage_weight = 28
ij_php_ternary_operation_signs_on_next_line = true
ij_php_ternary_operation_wrap = on_every_item
ij_php_throws_weight = 11
ij_php_todo_weight = 28
ij_php_unknown_tag_weight = 28
ij_php_upper_case_boolean_const = false
ij_php_upper_case_null_const = false
ij_php_uses_weight = 28
ij_php_var_weight = 28
ij_php_variable_naming_style = snake_case
ij_php_version_weight = 5
ij_php_while_brace_force = always
ij_php_while_on_new_line = true
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
ij_continuation_indent_size = 4
ij_json_keep_blank_lines_in_code = 1
ij_json_keep_indents_on_empty_lines = false
ij_json_keep_line_breaks = true
ij_json_space_after_colon = true
ij_json_space_after_comma = true
ij_json_space_before_colon = true
ij_json_space_before_comma = false
ij_json_spaces_within_braces = false
ij_json_spaces_within_brackets = false
ij_json_wrap_long_lines = false
[{*.htm,*.html,*.sht,*.shtm,*.shtml}]
ij_continuation_indent_size = 4
ij_visual_guides = 160
ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3
ij_html_align_attributes = false
ij_html_align_text = false
ij_html_attribute_wrap = on_every_item
ij_html_block_comment_add_space = false
ij_html_block_comment_at_first_column = true
ij_html_do_not_align_children_of_min_lines = 0
ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p
ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot
ij_html_enforce_quotes = true
ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var
ij_html_keep_blank_lines = 2
ij_html_keep_indents_on_empty_lines = false
ij_html_keep_line_breaks = true
ij_html_keep_line_breaks_in_text = true
ij_html_keep_whitespaces = false
ij_html_keep_whitespaces_inside = span,pre,textarea
ij_html_line_comment_at_first_column = true
ij_html_new_line_after_last_attribute = never
ij_html_new_line_before_first_attribute = when_multiline
ij_html_quote_style = double
ij_html_remove_new_line_before_tags = br
ij_html_space_after_tag_name = false
ij_html_space_around_equality_in_attribute = false
ij_html_space_inside_empty_tag = true
ij_html_text_wrap = off
[{*.markdown,*.md}]
ij_markdown_force_one_space_after_blockquote_symbol = true
ij_markdown_force_one_space_after_header_symbol = true
ij_markdown_force_one_space_after_list_bullet = true
ij_markdown_force_one_space_between_words = true
ij_markdown_keep_indents_on_empty_lines = false
ij_markdown_max_lines_around_block_elements = 1
ij_markdown_max_lines_around_header = 1
ij_markdown_max_lines_between_paragraphs = 1
ij_markdown_min_lines_around_block_elements = 1
ij_markdown_min_lines_around_header = 2
ij_markdown_min_lines_between_paragraphs = 1
[{*.yaml,*.yml}]
ij_yaml_align_values_properties = do_not_align
ij_yaml_autoinsert_sequence_marker = true
ij_yaml_block_mapping_on_new_line = false
ij_yaml_indent_sequence_value = true
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_sequence_on_new_line = true
ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = true
insert_final_newline = true
indent_style = space
indent_size = 4
-3
View File
@@ -1,3 +0,0 @@
VITE_APP_ALGOLIA_APP_ID=
VITE_APP_ALGOLIA_API_KEY=
VITE_APP_ALGOLIA_INDEX_NAME=
-17
View File
@@ -1,17 +0,0 @@
* text=auto
.github/ export-ignore
tests/ export-ignore
app/ export-ignore
docs/ export-ignore
excludes/ export-ignore
.editorconfig export-ignore
.env.example export-ignore
.gitattributes export-ignore
.gitignore export-ignore
package.json export-ignore
phpunit.xml export-ignore
-1
View File
@@ -1 +0,0 @@
open_collective: "laravel-lang"
-53
View File
@@ -1,53 +0,0 @@
name: Bug
description: Report a bug or other issue
labels: '👓 needs review'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
⚠️Review existing issues to see whether someone else has already reported your issue.
📖 Please also read [CONTRIBUTING.md](https://laravel-lang.com/contributing.html).
- type: textarea
id: environment
attributes:
label: Environment
description: |
Tip: Use the `composer info laravel-lang/lang` command to get information for Laravel Lang.
Tip: Use the `composer info laravel/framework` command to get information for Laravel Framework.
Tip: Use the `php -v` command to get information for PHP.
value: |
- Laravel-Lang Version:
- Laravel Version:
- PHP Version:
validations:
required: true
- type: textarea
id: description
attributes:
label: Issue description
description: |
Be as specific and detailed as possible to help us triaging your issue. Screenshots and/or animations can be very useful in helping to understand the issue you're facing.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
Tip: You can use https://www.screentogif.com to record animations and videos.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Take some time to try and reproduce the issue, then explain how to do so here.
validations:
required: true
- type: markdown
attributes:
value: |
❤️ Laravel Lang? Please consider supporting our collective: https://opencollective.com/laravel-lang
-11
View File
@@ -1,11 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Questions & Other
url: https://github.com/Laravel-Lang/lang/discussions
about: 'If you want to ask about something else, use the discussions.'
- name: Package Manager issue
url: https://laravel-lang.com/installation/managers.html
about: 'If you have a question about the work of a translation manager, ask their developers.'
- name: Laravel issue
url: https://github.com/laravel/framework/issues
about: 'If you have a question about your Laravel implementation, ask it in your Laravel project.'
@@ -1,45 +0,0 @@
name: Feature Proposal
description: Propose a new feature
labels:
- '💪 feature request'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
⚠️Review existing issues to see whether someone else has already reported your issue.
📖 Please also read [CONTRIBUTING.md](https://laravel-lang.com/contributing.html).
- type: textarea
id: description
attributes:
label: Feature description
description: |
Think through your proposal and describe it clearly.
Note that features are only added to the most recent version of Laravel Lang.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: |
Tip: Use the `composer info laravel-lang/lang` command to get information for Laravel Lang.
Tip: Use the `composer info laravel/framework` command to get information for Laravel Framework.
Tip: Use the `php -v` command to get information for PHP.
value: |
- Laravel-Lang Version:
- Laravel Version:
- PHP Version:
validations:
required: true
- type: markdown
attributes:
value: |
❤️ Laravel Lang? Please consider supporting our collective: https://opencollective.com/laravel-lang
-9
View File
@@ -1,9 +0,0 @@
version: 2
updates:
-
package-ecosystem: github-actions
directory: /
schedule:
interval: daily
timezone: UTC
time: '00:00'
-48
View File
@@ -1,48 +0,0 @@
name: docs
on:
workflow_dispatch:
repository_dispatch:
types:
- generate-docs
jobs:
handle-dispatch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
- name: Cache dependencies
uses: actions/cache@v3
id: npm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: npm i
- name: Build VuePress site
run: npm run build
env:
VITE_APP_ALGOLIA_APP_ID: ${{ secrets.VITE_APP_ALGOLIA_APP_ID }}
VITE_APP_ALGOLIA_API_KEY: ${{ secrets.VITE_APP_ALGOLIA_API_KEY }}
VITE_APP_ALGOLIA_INDEX_NAME: ${{ secrets.VITE_APP_ALGOLIA_INDEX_NAME }}
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2.6.0
with:
target_branch: gh-pages
build_dir: docs/.vuepress/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-14
View File
@@ -1,14 +0,0 @@
name: "Code-Style Check"
on: [ push, pull_request ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checking PHP Syntax
uses: TheDragonCode/codestyler@v2.1.0
-19
View File
@@ -1,19 +0,0 @@
name: "Code-Style Fixer"
on:
push:
branches: [ main ]
jobs:
fix:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checking PHP Syntax
uses: TheDragonCode/codestyler@v2.1.0
with:
github_token: ${{ secrets.COMPOSER_TOKEN }}
fix: true
-25
View File
@@ -1,25 +0,0 @@
name: phpunit
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
name: PHP Unit
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json
coverage: none
- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-progress --no-interaction
- name: Execute tests
run: sudo vendor/bin/phpunit --colors=always
-140
View File
@@ -1,140 +0,0 @@
name: update
on:
schedule:
- cron: 0 0 * * *
push:
branches:
- main
release:
types:
- released
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json
coverage: none
- name: Git setup
if: success()
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-progress --no-interaction
- name: Download packages
if: success()
run: php app/download.php
- name: Scanning packages
id: packages
if: success()
run: |
IS_DIRTY=1
php app/packages.php
{ git add . && git commit -a -m "Updating package files"; } || IS_DIRTY=0
echo ::set-output name=is_dirty::${IS_DIRTY}
- name: Keys actualization
id: keys
if: success()
run: |
IS_DIRTY=1
php app/keys.php
{ git add . && git commit -a -m "Updating translations keys"; } || IS_DIRTY=0
echo ::set-output name=is_dirty::${IS_DIRTY}
- name: Updating referents
id: referents
if: success()
run: |
IS_DIRTY=1
php app/referents.php
{ git add . && git commit -a -m "Updating the docs/referents.md file"; } || IS_DIRTY=0
echo ::set-output name=is_dirty::${IS_DIRTY}
- name: Checking for excludes
id: excludes
if: success()
run: |
IS_DIRTY=1
php app/excludes.php
{ git add . && git commit -a -m "Updating excludes files"; } || IS_DIRTY=0
echo ::set-output name=is_dirty::${IS_DIRTY}
- name: Update statuses
id: status
if: success()
run: |
IS_DIRTY=1
php app/status.php
{ git add . && git commit -a -m "Updated status of translations"; } || IS_DIRTY=0
echo ::set-output name=is_dirty::${IS_DIRTY}
- name: Update changelog
uses: stefanzweifel/changelog-updater-action@v1
if: success() && github.event_name == 'release'
with:
release-date: ${{ steps.release_date.outputs.date }}
release-notes: ${{ github.event.release.body }}
latest-version: ${{ github.event.release.tag_name }}
compare-url-target-revision: ${{ github.event.release.target_commitish }}
path-to-changelog: docs/changelog/10.x.md
- name: Storing changelog
id: changelog
if: success()
run: |
IS_DIRTY=1
{ git add . && git commit -a -m "Update CHANGELOG 🧾"; } || IS_DIRTY=0
echo ::set-output name=is_dirty::${IS_DIRTY}
- name: Push changes
uses: ad-m/github-push-action@master
if: |
success() && (
steps.excludes.outputs.is_dirty == 1 ||
steps.keys.outputs.is_dirty == 1 ||
steps.packages.outputs.is_dirty == 1 ||
steps.referents.outputs.is_dirty == 1 ||
steps.status.outputs.is_dirty == 1 ||
steps.changelog.outputs.is_dirty == 1
)
with:
github_token: ${{ secrets.COMPOSER_TOKEN }}
- name: Generate Docs Trigger
uses: myrotvorets/trigger-repository-dispatch-action@1.1.1
if: success()
with:
token: ${{ secrets.COMPOSER_TOKEN }}
repo: Laravel-Lang/lang
type: generate-docs
+4 -17
View File
@@ -1,20 +1,7 @@
.idea/
_site/
build/
node_modules/
vendor/
.cache
/_site/
/.idea/
/vendor/
.DS_Store
.env
.php_cs.cache
.phpintel
.temp
*.bak
*.cache
*.clover
*.orig
composer.lock
package-lock.json
.phpintel
+69
View File
@@ -0,0 +1,69 @@
<?php
$header = <<<'EOF'
This file is part of PHP CS Fixer.
(c) Fabien Potencier <fabien@symfony.com>
Dariusz Rumiński <dariusz.ruminski@gmail.com>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
$config = PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PHP56Migration' => true,
'@PHPUnit60Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'compact_nullable_typehint' => true,
'escape_implicit_backslashes' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'final_internal_class' => true,
'heredoc_to_nowdoc' => true,
'list_syntax' => ['syntax' => 'long'],
'method_chaining_indentation' => true,
'method_argument_space' => ['ensure_fully_multiline' => true],
'multiline_comment_opening_closing' => true,
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
'no_null_property_initialization' => true,
'no_short_echo_tag' => true,
'no_superfluous_elseif' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_final_method' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_types_order' => true,
'semicolon_after_instruction' => true,
'single_line_comment_style' => true,
'strict_comparison' => true,
'strict_param' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('tests/Fixtures')
->in(__DIR__)
)
;
// special handling of fabbot.io service if it's using too old PHP CS Fixer version
try {
PhpCsFixer\FixerFactory::create()
->registerBuiltInFixers()
->registerCustomFixers($config->getCustomFixers())
->useRuleSet(new PhpCsFixer\RuleSet($config->getRules()));
} catch (PhpCsFixer\ConfigurationException\InvalidConfigurationException $e) {
$config->setRules([]);
} catch (UnexpectedValueException $e) {
$config->setRules([]);
} catch (InvalidArgumentException $e) {
$config->setRules([]);
}
return $config;
-13
View File
@@ -1,13 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="build" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="build" />
</scripts>
<node-interpreter value="project" />
<package-manager value="npm" />
<envs />
<method v="2" />
</configuration>
</component>
-13
View File
@@ -1,13 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="dev" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="dev" />
</scripts>
<node-interpreter value="project" />
<package-manager value="npm" />
<envs />
<method v="2" />
</configuration>
</component>
+29
View File
@@ -0,0 +1,29 @@
# Changelog
## [3.0.2] 2016-05-11
###
* *dimensions* in validation
## [3.0.0] 2016-04-24
* v3: new directory for languages
## [2.0.40] 2016-03-12
### Added
* todo list: in todo.md
## [2.0.36] 2016-03-07
### Added
* *in_array* in validation
## [2.0.35] 2016-03-01
### Added
* *distinct* in validation
## [2.0.34] 2016-02-27
### Added
* *present* in validation
+6 -16
View File
@@ -2,9 +2,7 @@
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free
experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion,
or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
@@ -26,31 +24,23 @@ Examples of unacceptable behavior by participants include:
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances
of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this
Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or
community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
Representation of a project may be further defined and clarified by project maintainers.
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. The project team will review and investigate all complaints, and
will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at caouecs@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's
leadership.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
+36
View File
@@ -0,0 +1,36 @@
# Contributing
Contributions are **welcome** and will be fully **credited**.
We accept contributions via Pull Requests on [Github](https://github.com/caouecs/Laravel-lang).
## How can I add a language in this project ?
* fork this repository
* create a directory in *src* with the short name of the language (ex: fr for French) from ISO-639-1 ( see [Wikipedia](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) )
* copy these four files of the English version with your translation : from *script/en* directory
* run [PHP-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)
* if installed to global, run `php-cs-fixer fix`.
* if installed to project local, run `vendor/bin/php-cs-fixer fix`.
* add a pull request with the name of the language
* ex: [fr] New language
## How can I fix a file ?
* fork this repository
* update the file
* run [PHP-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)
* if installed to global, run `php-cs-fixer fix`.
* if installed to project local, run `vendor/bin/php-cs-fixer fix`.
* add a pull request with the name of the language
* ex: [fr] Update validation for number in validation
## Status of files
* todo.md
### Update todo file
```php
php script/todo.php
```
+3 -3
View File
@@ -1,6 +1,6 @@
# MIT License
# The MIT License (MIT)
Copyright (c) 2022 Laravel-Lang Team
Copyright (c) 2016 caouecs <caouecs@caouecs.net>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ Copyright (c) 2022 Laravel-Lang Team
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
> THE SOFTWARE.
+57 -18
View File
@@ -1,28 +1,67 @@
# Laravel Lang
# Laravel-lang
![laravel lang localizations](https://preview.dragon-code.pro/laravel-lang/localizations.svg?brand=laravel)
[![Stories in Ready](https://badge.waffle.io/caouecs/Laravel-lang.svg)](http://waffle.io/caouecs/Laravel-lang)
In this repository, you can find the lang files for the [Laravel Framework](https://laravel.com), [Laravel Jetstream](https://jetstream.laravel.com), [Laravel Fortify](https://github.com/laravel/fortify), [Laravel Cashier](https://laravel.com/docs/billing), [Laravel Breeze](https://github.com/laravel/breeze), [Laravel Nova](https://nova.laravel.com), [Laravel Spark](https://spark.laravel.com) and [Laravel UI](https://github.com/laravel/ui).
In this repository, you can find the lang files for the framework PHP, [Laravel 4&5](http://www.laravel.com).
<p align="center">
[
<a href="https://laravel-lang.com">Documentation</a> |
<a href="https://laravel-lang.com/status.html">Translations Status</a>
]
</p>
## Install
## Documentation
#### Via Composer
* For Laravel 5.8 : run `composer require caouecs/laravel-lang:~4.0` in your project folder
* For Laravel 5.1-7 : run `composer require caouecs/laravel-lang:~3.0` in your project folder
* For Laravel 5 : run `composer require caouecs/laravel-lang:~2.0` in your project folder
* For Laravel 4 : run `composer require caouecs/laravel-lang:~1.0` in your project folder
* Files of languages are in "vendor/caouecs/laravel-lang" directory
* Copy the folders of languages that you want, in the *resources/lang* folder of your Laravel application (*app/lang* in Laravel 4).
See the [documentation](https://laravel-lang.com) for detailed installation and usage instructions.
#### Via GitHub
## Translation managers
* Clone the [GitHub repository](https://github.com/caouecs/laravel-lang/) : *git clone https://github.com/caouecs/Laravel-lang.git*
* Or download the [zip file](https://github.com/caouecs/laravel-lang/archive/master.zip)
* Choose the branch:
* `laravel4` for Laravel4 project
* `master` for Laravel 5.1-5.7 project
* `laravel58` for Laravel 5.8 project
* Copy the folders of languages that you want, in *resources/lang* folder of your Laravel application (*app/lang* in Laravel 4).
* [Lang Publisher](https://publisher.laravel-lang.com) by [*@Laravel-Lang/laravel-lang*](https://github.com/Laravel-Lang/publisher) - Easy installation and update of
translation files for your project.
* [LaravelLang](https://github.com/ARCANEDEV/LaravelLang) by [*@arcanedev-maroc*](https://github.com/ARCANEDEV) - Translations manager and checker for Laravel.
* [Laravel-lang](https://github.com/overtrue/laravel-lang) by [*@overtrue*](https://github.com/overtrue) - Command to add languages in your project.
#### Via SVN
Run this in your project directory:
```sh
# Laravel 5:
svn export https://github.com/caouecs/Laravel-lang/trunk/src/[language-code] resources/lang/[language-code]
# Laravel 4:
svn export https://github.com/caouecs/Laravel-lang/branches/laravel4/[language-code] app/lang/[language-code]
```
Replace `[language-code]` by any of the languages listed [here](src).
## Usage [Laravel only]
In the file *config/app.php*, change the value of *locale* by the short name of your language (*app/config/app.php* in Laravel 4).
## Change log
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Status of files
* Check the [todo.md](todo.md) file to see the missing translations.
## Projects based on this package
* [LaravelLang by ARCANEDEV](https://github.com/ARCANEDEV/LaravelLang) - Translations manager and checker for Laravel 5.
* [Laravel-lang by overtrue](https://github.com/overtrue/laravel-lang) - Command to add languages in your project.
* [laravel-lang-installer by ablunier](https://github.com/ablunier/laravel-lang-installer) - Command for easily add languages to a Laravel project.
* [laravel-lang-publisher by Andrey Helldar](https://github.com/andrey-helldar/laravel-lang-publisher) - Easy installation and update of translation files for your project.
## Credits
- [Referents by language](https://laravel-lang.com/referents.html)
- [All Contributors](https://github.com/Laravel-Lang/lang/graphs/contributors)
- [caouecs](https://github.com/caouecs)
- [All Contributors](https://github.com/caouecs/Laravel-lang/graphs/contributors)
-3
View File
@@ -1,3 +0,0 @@
# Security Policy
This project is text translations of Laravel project. So, this project doesn't need to have security policy.
+302
View File
@@ -0,0 +1,302 @@
# Sources
Albanian (sq)
* [Flakerim Ismani](https://github.com/Flakerimi)
* [Shefqet Avdullau](https://github.com/shefi)
Arabic (ar)
* [Ammar Alakkad](https://github.com/AAlakkad)
* [bo3bdo](https://github.com/bo3bdo)
* [Ibrahim AshShohail](https://github.com/laheab)
* [Ihab Shoully](https://github.com/shoully)
* [Mohamed Sabil](https://github.com/mohamedsabil83)
* [Youghourta Benali](https://github.com/djug)
Bosnian (bs)
* [Edis Golubić](https://github.com/golubic)
* [mrakodol](https://github.com/mrakodol)
* [Stojan Kukrika](https://github.com/stojankukrika)
Brazilian (pt-BR)
* [c0h1b4](https://github.com/c0h1b4)
* [Fernando Henrique Bandeira](https://github.com/fernandobandeira)
* [Gabriel Machado](https://github.com/gmsantos)
* [insign](https://github.com/insign)
* [miguelbgouveia](https://github.com/miguelbgouveia)
* [Ramiro Varandas Jr](https://github.com/ramirovjr)
* [Ricardo Fuhrmann](https://github.com/Fuhrmann)
Bulgarian (bg)
* [Roumen Damianoff](https://github.com/RoumenDamianoff)
* [starstreak](https://github.com/starstreak)
Cambodian (km)
* [Chanthoeun Kim](https://github.com/Chanthoeun)
Catalan (ca)
* [David Moreno](https://github.com/davidmb91)
* [Gerard Nesta](https://github.com/gerardnll)
Chinese (zh-CN)
* [安正超](https://github.com/overtrue)
* [JohnLui](https://github.com/johnlui)
* [keeword](https://github.com/keeword)
* [phoenixg](https://github.com/phoenixg)
* [zhuzhichao](https://github.com/zhuzhichao)
Chinese from Taiwan (zh-TW)
* [安正超](https://github.com/overtrue)
* [Wei-Hao Syu](https://github.com/whsyu)
* [zhuzhichao](https://github.com/zhuzhichao)
Croatian (hr)
* [Denis Stančer](https://github.com/dstancer)
Czech (cs)
* [rozklad](https://github.com/rozklad)
Danish (da)
* [Andreas Heiberg](https://github.com/AndreasHeiberg)
* [Christoffer Hauthorn Boisen](https://github.com/hauthorn)
* [Daniel Bøndergaard](https://github.com/danielboendergaard)
Dutch (nl)
* [byordereurope](https://github.com/byordereurope)
* [Herman](https://github.com/sintemaa)
* [Jaspur](https://github.com/jaspur)
* [Jeroen Gerits](https://github.com/jeroengerits)
* [jordyvandomselaar](https://github.com/jordyvandomselaar)
* [juukie14](https://github.com/juukie14)
* [Mark Mooibroek](https://github.com/markmooibroek)
* [Thomas de Zeeuw](https://github.com/Thomasdezeeuw)
Farsi (fa)
* [Mahdi Ghadamyari](https://github.com/i0)
* [Reza](https://github.com/PlangCoder)
Finnish (fi)
* [Linus Odenring](https://github.com/linusodenring)
* [Patrik](https://github.com/gkunno)
French (fr)
* [Alexandre Butynski](https://github.com/alexandre-butynski)
* [Alex-Info.net](https://github.com/AlexInfoNet)
* [Barbuslex](https://github.com/barbuslex)
* [Elyahou](https://github.com/Elyahou)
* [Erwan](https://github.com/NaWer)
* [Fred Delrieu](https://github.com/caouecs)
* [Laravel-France](https://github.com/laravel-france)
* [lucbu](https://github.com/lucbu)
* [Youghourta Benali](https://github.com/djug)
German (de)
* [Gerald Lindner](https://github.com/vauteer)
* [iflow](https://github.com/iflow)
* [Jones](https://github.com/JN-Jones)
* [justb81](https://github.com/justb81)
* [lanort](https://github.com/lanort)
* [Marius Gebhardt](https://github.com/gbhrdt)
* [Martin Hettiger](https://github.com/hettiger)
* [nullEuro](https://github.com/nullEuro)
Georgian (ka)
* [Lado Lomidze (Landish)](https://github.com/Landish/)
Greek (el)
* [dimsav](https://github.com/dimsav)
* [igaster](https://github.com/igaster)
* [Konstantinos Pittas](https://github.com/kostaspt)
* [Nikos Gr](https://github.com/grrnikos)
Hebrew (he)
* [Orel Ben-Yair](https://github.com/LighTo273)
Hungarian (hu)
* [lintaba](https://github.com/lintaba)
* [Tamás Erdélyi](https://github.com/terdelyi)
* [Zsombor Franczia](https://github.com/frzsombor)
* [balping](https://github.com/balping)
Icelandic (is)
* [Kristján Ingi Geirsson](https://github.com/kristjaningi)
Indonesian (id)
* [apit](https://github.com/apit)
* [Budi Irawan](https://github.com/deerawan)
* [Ivo Idham Perdameian](https://github.com/idhamperdameian)
* [William Notowidagdo](https://github.com/williamn)
* [Salahuddin Hairai](https://github.com/od3n)
Italian (it)
* [alextesi](https://github.com/alextesi)
* [Davide Bellini](https://github.com/billmn)
* [Ionut Tanasa](https://github.com/ionut-tanasa)
* [longilineo](https://github.com/longilineo)
Japanese (ja)
* [Hirohisa Kawase](https://github.com/HiroKws)
* [Yuya Takahashi](https://github.com/takahashiyuya)
* [Jumilla](https://github.com/jumilla)
* [Keishi Mitsuhashi](https://github.com/xenbeat)
Korean (ko)
* [dbwhddn10](https://github.com/dbwhddn10)
* [Kaden Lee](https://github.com/thisiskaden)
Lithunian (lt)
* [fosron](https://github.com/fosron)
* sigitas
* [trigras](https://github.com/trigras)
Macedonian (mk)
* [Marko Aleksic](https://github.com/psybaron)
* [maced0n](https://github.com/maced0n)
Malay (ms)
* [Salahuddin Hairai](https://github.com/od3n)
* [Kamarool Karim](https://github.com/kamaroolkarim)
Montenegrin (me)
* [Ognjen MIletić](https://github.com/ognjenm)
Norwegian Bokmål (nb)
* [Marius](https://github.com/mariuso)
* [thomeu](https://github.com/thomeu)
Persian (fa)
* [Siamak A.M](https://github.com/blacksrc)
Polish (pl)
* [anojszewski](https://github.com/anojszewski)
* [Jakub Syty](https://github.com/Nekromancer)
* [Marcin Sągol](https://github.com/soee)
Portuguese (pt)
* [Francisco Neves](https://github.com/fntneves)
* [miguelbgouveia](https://github.com/miguelbgouveia)
* [Ramiro Varandas Jr](https://github.com/ramirovjr)
Romanian (ro)
* [flavy](https://github.com/flavy)
* [Ionut Tanasa](https://github.com/ionut-tanasa)
* [Liviu Roman](https://github.com/liviuroman)
* [Vadim](https://github.com/cojocaru)
Russian (ru)
* [Evgeny Kovalev](https://github.com/EvgenyKovalev)
* [Vasily Tsybenko](https://github.com/VasayXTX)
* [Andrey Helldar](https://github.com/andrey-helldar)
Sardinian (sc)
* [Massimeddu Cireddu](https://github.com/massimeddu)
Serbian (sr)
* [Adis](https://github.com/adis-me)
* [Dejan Geci](https://github.com/dejangeci)
Slovak (sk)
* [Andrej Badin](https://github.com/Andreyco)
* [Martin Olšanský](https://github.com/MartinOlsansky)
* [Peter Angelov](https://github.com/peterangelov)
Slovene (sl)
* [extra90](https://github.com/extra90)
Spanish (es)
* [Anton Zekeriev Rodin](https://github.com/antonrodin)
* Benjamin Worwa
* [Facundo Farias](https://github.com/facundofarias)
* [Javier Cadiz](https://github.com/cadizjavier)
* [Nikolas](https://github.com/nikoskip)
* [sauralph](https://github.com/sauralph)
Swedish (sv)
* [Alexander Wallin](https://github.com/alexanderwallin)
* [Christoffer Rydberg](https://github.com/murum)
* [coldKingdom](https://github.com/coldKingdom)
* [Jellyfrog](https://github.com/Jellyfrog)
* [Jonas Söderberg](https://github.com/imevul)
* [Linus Odenring](https://github.com/linusodenring)
* [Robin Hallabro](https://github.com/hallabro)
* [thomeu](https://github.com/thomeu)
* [Vincent Klaiber](https://github.com/vincentklaiber)
Thai (th)
* [chotikarn](https://github.com/chotikarn)
* [Pachara Limkraisan](https://github.com/kthoth)
* [Teepluss](https://github.com/teepluss)
Traditional Chinese (Hong Kong) (zh-HK)
* [安正超](https://github.com/overtrue)
* [Eric Li](https://github.com/ericksli)
* [Fatih AYTAÇ](https://github.com/computeus)
* [keeword](https://github.com/keeword)
* [zhuzhichao](https://github.com/zhuzhichao)
Turkish (tr)
* [Arda Kılıçdağı](https://github.com/Ardakilic)
* [azakhi](https://github.com/azakhi)
* [Isa Ishangulyyev](https://github.com/isa424)
* [Mete Kabak](https://github.com/metekabak)
* [pellempus](https://github.com/pellempus)
* [Sinan Eldem](https://github.com/sineld)
Turkmen (tk)
* [Isa Ishangulyyev](https://github.com/isa424)
Ukrainian (uk)
* [Denis Isaychenko](https://github.com/Rhincodon)
* taras
Vietnamese (vi)
* [anhsaker](https://github.com/anhsaker)
* [Nguyễn Văn Ánh](https://github.com/anhskohbo)
* [Đinh Quốc Hân](https://github.com/dinhquochan)
-7
View File
@@ -1,7 +0,0 @@
YANDEX_API_KEY=
YANDEX_API_FOLDER_ID=
GIT_REPOSITORY=origin
GIT_SOURCE_BRANCH=main
GIT_TARGET_BRANCH=patch
GIT_MESSAGE="[%s] Some message"
-3
View File
@@ -1,3 +0,0 @@
requests/
.env
-16
View File
@@ -1,16 +0,0 @@
<?php
use LaravelLang\Development\Processors\AddLocale;
require __DIR__ . '/bootstrap/autoload.php';
/** @var \LaravelLang\Development\Application $app */
$app = require_once __DIR__ . '/bootstrap/app.php';
if ($locale = $argv[1] ?? null) {
$app->processor(AddLocale::make($argv[1]));
return;
}
echo 'You must provide a localization code.';
-7
View File
@@ -1,7 +0,0 @@
<?php
use LaravelLang\Development\Application;
return Application::make(
realpath(__DIR__ . '/../../')
);
-5
View File
@@ -1,5 +0,0 @@
<?php
declare(strict_types=1);
require __DIR__ . '/../../vendor/autoload.php';
-10
View File
@@ -1,10 +0,0 @@
<?php
use LaravelLang\Development\Processors\Download;
require __DIR__ . '/bootstrap/autoload.php';
/** @var \LaravelLang\Development\Application $app */
$app = require_once __DIR__ . '/bootstrap/app.php';
$app->processor(Download::make());
-10
View File
@@ -1,10 +0,0 @@
<?php
use LaravelLang\Development\Processors\Excludes;
require __DIR__ . '/bootstrap/autoload.php';
/** @var \LaravelLang\Development\Application $app */
$app = require_once __DIR__ . '/bootstrap/app.php';
$app->processor(Excludes::make());
-10
View File
@@ -1,10 +0,0 @@
<?php
use LaravelLang\Development\Processors\Keys;
require __DIR__ . '/bootstrap/autoload.php';
/** @var \LaravelLang\Development\Application $app */
$app = require_once __DIR__ . '/bootstrap/app.php';
$app->processor(Keys::make());
-92
View File
@@ -1,92 +0,0 @@
<?php
namespace LaravelLang\Development;
use Dotenv\Dotenv;
use DragonCode\Support\Concerns\Makeable;
use LaravelLang\Development\Contracts\Application as ApplicationContract;
use LaravelLang\Development\Contracts\Processable;
use LaravelLang\Development\Facades\Env;
class Application implements ApplicationContract
{
use Makeable;
public function __construct(
protected string $base_path
) {
$this->createDotenv()->safeLoad();
}
public function basePath(): string
{
return rtrim($this->base_path, '/\\');
}
public function sourcePath(?string $filename = null): string
{
return $this->path('source/' . $this->cleanPath($filename));
}
public function localePath(?string $locale = null): string
{
return $this->path('locales/' . $this->cleanPath($locale));
}
public function excludePath(string $locale): string
{
return $this->path('excludes/' . $this->cleanPath($locale) . '.php');
}
public function resourcePath(string $filename): string
{
return $this->path('app/resources/' . $this->cleanPath($filename));
}
public function vendorPath(string $filename): string
{
return $this->path('vendor/' . $this->cleanPath($filename));
}
public function path(?string $path = null): string
{
if ($value = $this->cleanPath($path)) {
return $this->basePath() . '/' . $value;
}
return $this->basePath();
}
public function cleanPath(?string $path = null): ?string
{
if (! empty($path)) {
return ltrim($path, '/\\');
}
return null;
}
public function processor(Processable $processor): void
{
$processor->application($this)->run();
}
protected function createDotenv(): Dotenv
{
return Dotenv::create(
Env::getRepository(),
$this->environmentPath(),
$this->environmentFile()
);
}
protected function environmentPath(): string
{
return $this->path('app');
}
protected function environmentFile(): string
{
return '.env';
}
}
-45
View File
@@ -1,45 +0,0 @@
<?php
namespace LaravelLang\Development\Concerns;
use DragonCode\Support\Facades\Filesystem\Directory;
use DragonCode\Support\Facades\Helpers\Str;
use LaravelLang\Development\Constants\Locales;
trait Contains
{
protected function isMainJson(string $filename): bool
{
if ($this->isEnglishJson($filename)) {
return true;
}
$locale = Str::before($filename, '.');
$path = $this->app->localePath($locale);
return $this->isJson($filename) && Directory::exists($path);
}
protected function isEnglishJson(string $filename): bool
{
return $this->isJson($filename) && str_starts_with($filename, Locales::ENGLISH);
}
protected function isJson(string $filename): bool
{
return str_ends_with($filename, 'json');
}
protected function isMarkdown(string $filename): bool
{
return str_ends_with($filename, 'md');
}
protected function isValidation(string $filename): bool
{
$names = ['validation.php', 'validation-inline.php'];
return in_array($filename, $names, true);
}
}
-105
View File
@@ -1,105 +0,0 @@
<?php
namespace LaravelLang\Development\Concerns;
use DragonCode\Support\Facades\Helpers\Digit;
use DragonCode\Support\Facades\Helpers\Str;
use LaravelLang\Development\Services\Counter;
trait Countable
{
protected array $count = [];
protected string $count_prefix = 'count_';
protected string $count_suffix = '_percents';
protected string $count_suffix_all = 'all';
protected function addCount(array $items, string $key = 'all'): void
{
$key = $this->countKeyPrefix($key);
if (! isset($this->count[$key])) {
$this->count[$key] = 0;
}
$this->count[$key] += $this->calcCount($items);
}
protected function getCount(string $key = 'all'): int
{
$key = $this->countKeyPrefix($key);
return $this->count[$key];
}
protected function setCount(int $count, string $key = 'all'): void
{
$key = $this->countKeyPrefix($key);
$this->count[$key] = $count;
}
protected function getCounts(): array
{
$this->calcPercents();
$this->countToString();
return $this->count;
}
protected function calcPercents(): void
{
$all = $this->getCount();
$all_key = $this->countKeyPrefix($this->count_suffix_all);
$items = $this->count;
foreach ($items as $key => $value) {
if ($key !== $all_key) {
$value = $all - $value;
$percent = $this->calcPercent($all, $value);
$new_key = $this->countKeySuffix($key);
$this->setCount($value, $key);
$this->setCount($percent, $new_key);
}
}
}
protected function calcPercent(int $all, int $count): int
{
return round(($count / $all) * 100);
}
protected function countToString(): void
{
foreach ($this->count as &$value) {
$value = $this->countFormat($value);
}
}
protected function calcCount(int|array $value): int
{
return is_int($value) ? $value : Counter::make()->count($value);
}
protected function countKeyPrefix(string $key): string
{
return Str::start($key, $this->count_prefix);
}
protected function countKeySuffix(string $key): string
{
return Str::finish($key, $this->count_suffix);
}
protected function countFormat(int $count): string
{
return Digit::toShort($count);
}
}
-36
View File
@@ -1,36 +0,0 @@
<?php
namespace LaravelLang\Development\Concerns;
use DragonCode\PrettyArray\Services\File as PrettyFile;
use DragonCode\Support\Facades\Filesystem\File;
/** @mixin \LaravelLang\Development\Processors\Processor */
trait Excludes
{
protected static array $excludes = [];
protected function hasExclude(string $value, string $locale): bool
{
return $this->hasExcludeValue($locale, $value)
|| $this->hasExcludeValue('_all', $value);
}
protected function hasExcludeValue(string $key, string $value): bool
{
$excludes = $this->getExcludes($key);
return in_array($value, $excludes, true);
}
protected function getExcludes(string $key): array
{
$path = $this->app->excludePath($key);
if (static::$excludes[$key] ?? false) {
return static::$excludes[$key];
}
return static::$excludes[$key] = File::exists($path) ? PrettyFile::make()->load($path) : [];
}
}
-39
View File
@@ -1,39 +0,0 @@
<?php
namespace LaravelLang\Development\Concerns;
use DragonCode\Support\Facades\Instances\Instance;
use DragonCode\Support\Tools\Stub;
use LaravelLang\Development\Contracts\Stringable;
trait Storable
{
protected ?string $stub = null;
protected function prepareToStore(array|string|Stringable $content): string
{
if (Instance::of($content, Stringable::class)) {
return $content->toString();
}
if (is_array($content)) {
return implode(PHP_EOL, $content);
}
return $content;
}
protected function getStub(string $filename): string
{
return $this->findStub($this->stub ?: $filename);
}
protected function findStub(string $filename): string
{
$basename = pathinfo($filename, PATHINFO_FILENAME);
$path = $this->app->resourcePath('arrays/' . $basename . '.stub');
return file_exists($path) ? $path : Stub::PHP_ARRAY;
}
}
-40
View File
@@ -1,40 +0,0 @@
<?php
namespace LaravelLang\Development\Concerns;
use DragonCode\Support\Facades\Helpers\Str;
trait Template
{
protected static array $templates = [];
protected function template(string $filename, array $values = [], bool $trim = false, bool $return_empty = false): string
{
$template = $this->getTemplate($filename, $trim);
$values = array_merge($this->extend ?? [], $values);
return $this->replace($template, $values, $return_empty);
}
protected function replace(string $template, array $values, bool $return_empty = false): string
{
return $return_empty ? '' : Str::replaceFormat($template, $values, '{{%s}}');
}
protected function getTemplate(string $filename, bool $trim = false): string
{
if (static::$templates[$filename] ?? false) {
return static::$templates[$filename];
}
$template = file_get_contents($this->templatePath($filename));
return static::$templates[$filename] = $trim ? trim($template) : $template;
}
protected function templatePath(string $filename): string
{
return $this->app->resourcePath($filename);
}
}
-8
View File
@@ -1,8 +0,0 @@
<?php
namespace LaravelLang\Development\Constants;
class Locales
{
public const ENGLISH = 'en';
}
-41
View File
@@ -1,41 +0,0 @@
<?php
namespace LaravelLang\Development\Constants;
class Machines
{
public const LOCALES = [
'az',
'be',
'bs',
'cs',
'cy',
'da',
'et',
'eu',
'gl',
'he',
'hi',
'hu',
'is',
'ka',
'kk',
'kn',
'lv',
'mn',
'mr',
'sk',
'sl',
'sq',
'sr_Cyrl',
'sr_Latn',
'sr_Latn_ME',
'tg',
'th',
'tl',
'uk',
'ur',
'uz_Cyrl',
'uz_Latn',
];
}
-52
View File
@@ -1,52 +0,0 @@
<?php
namespace LaravelLang\Development\Constants;
class Referents
{
public const ar = ['mohamedsabil83', 'Khuthaily'];
public const da = ['jensstigaard'];
public const de = ['WhereIsLucas', 'sotten'];
public const de_CH = ['sotten'];
public const es = ['luisprmat'];
public const fa = ['ariaieboy'];
public const fr = ['caouecs', 'WhereIsLucas'];
public const it = ['masterix21'];
public const mk = ['keljtanoski'];
public const nl = ['WhereIsLucas'];
public const pl = ['Olsza'];
public const pt = ['jorgercosta'];
public const pt_BR = ['EuCarlos'];
public const ru = ['andrey-helldar'];
public const sr_Cyrl = ['LukaLatkovic'];
public const sr_Latn = ['LukaLatkovic'];
public const sr_Latn_ME = ['LukaLatkovic'];
public const sw = ['Pheogrammer'];
public const uk = ['MrAlKuz'];
public const vi = ['dinhquochan'];
public const zh_CN = ['overtrue'];
public const zh_HK = ['overtrue'];
public const zh_TW = ['overtrue'];
}
-28
View File
@@ -1,28 +0,0 @@
<?php
namespace LaravelLang\Development\Constants;
class Resource
{
public const STATUS = 'status.stub';
public const LOCALE = 'locale.stub';
public const REFERENTS = 'referents.stub';
public const COMPONENT_ALL_TRANSLATED = 'components/translated.stub';
public const COMPONENT_LINK = 'components/link.stub';
public const COMPONENT_LOCALE = 'components/locale.stub';
public const COMPONENT_TABLE = 'components/table/index.stub';
public const COMPONENT_TABLE_COLUMN = 'components/table/column.stub';
public const COMPONENT_TABLE_ROW = 'components/table/row.stub';
public const COMPONENT_TABLE_ATTRIBUTE_ALIGN = 'components/table/attributes/align.stub';
public const COMPONENT_TABLE_ATTRIBUTE_WIDTH = 'components/table/attributes/width.stub';
}
-26
View File
@@ -1,26 +0,0 @@
<?php
namespace LaravelLang\Development\Contracts;
interface Application
{
public function __construct(string $base_path);
public function basePath(): string;
public function sourcePath(?string $filename = null): string;
public function localePath(?string $locale = null): string;
public function excludePath(string $locale): string;
public function resourcePath(string $filename): string;
public function vendorPath(string $filename): string;
public function path(?string $path = null): string;
public function cleanPath(?string $path = null): ?string;
public function processor(Processable $processor): void;
}
-15
View File
@@ -1,15 +0,0 @@
<?php
namespace LaravelLang\Development\Contracts;
use DragonCode\Support\Tools\Stub;
use LaravelLang\Development\Application;
interface Filesystem
{
public function application(Application $app): self;
public function load(string $path): array;
public function store(string $path, array|string|Stringable $content, bool $is_simple = false, string $stub = Stub::PHP_ARRAY): void;
}
-12
View File
@@ -1,12 +0,0 @@
<?php
namespace LaravelLang\Development\Contracts;
use LaravelLang\Development\Application;
interface Processable
{
public function run(): void;
public function application(Application $app): self;
}
-8
View File
@@ -1,8 +0,0 @@
<?php
namespace LaravelLang\Development\Contracts;
interface Stringable
{
public function toString(): string;
}
@@ -1,30 +0,0 @@
<?php
namespace LaravelLang\Development\DataTransferObjects;
use DragonCode\SimpleDataTransferObject\DataTransferObject;
class PackageDTO extends DataTransferObject
{
public string $filename;
public bool $replace = true;
public array $copy_files = [];
protected $map = [
'filename',
'replace',
'copy_files',
];
protected function castReplace(?bool $can): bool
{
return $can !== false;
}
protected function castCopyFiles(array|string|null $files): array
{
return (array) ($files ?? []);
}
}
-20
View File
@@ -1,20 +0,0 @@
<?php
namespace LaravelLang\Development\Facades;
use Dotenv\Repository\AdapterRepository;
use Dotenv\Repository\RepositoryInterface;
use DragonCode\Support\Facades\Facade;
use LaravelLang\Development\Support\Env as Support;
/**
* @method static mixed get(string $key, mixed $default = null)
* @method static AdapterRepository|RepositoryInterface getRepository()
*/
class Env extends Facade
{
protected static function getFacadeAccessor(): mixed
{
return Support::class;
}
}
-32
View File
@@ -1,32 +0,0 @@
<?php
namespace LaravelLang\Development\Facades;
use DragonCode\Support\Facades\Facade;
use LaravelLang\Development\Support\Finder;
use LaravelLang\Development\Support\Package as Support;
use LaravelLang\Development\Support\Parser;
use Symfony\Component\Finder\Finder as SymfonyFinder;
/**
* @method static Support some()
*/
class Package extends Facade
{
protected static function getFacadeAccessor(): mixed
{
return new Support(self::resolveFinder(), self::resolveParser());
}
protected static function resolveFinder(): Finder
{
$finder = SymfonyFinder::create();
return Finder::make($finder);
}
protected static function resolveParser(): Parser
{
return Parser::make();
}
}
-17
View File
@@ -1,17 +0,0 @@
<?php
namespace LaravelLang\Development\Facades;
use DragonCode\Support\Facades\Facade;
use LaravelLang\Development\Services\Translate as Service;
/**
* @method static string translate(string $locale, string $text)
*/
class Translate extends Facade
{
protected static function getFacadeAccessor(): mixed
{
return Service::class;
}
}
-47
View File
@@ -1,47 +0,0 @@
<?php
namespace LaravelLang\Development\Models;
use LaravelLang\Development\Constants\Machines;
class Locale extends Model
{
public function __construct(
protected ?string $locale = null,
protected ?int $missing = 0
) {
}
public function getLocale(): ?string
{
return $this->locale;
}
public function getTitle(): ?string
{
if (! $this->isEmpty()) {
$status = $this->getMissing() ? '❗' : '✔';
$machine = $this->hasMachine() ? '&nbsp;🤖' : '';
return $this->locale . '&nbsp;' . $status . $machine;
}
return null;
}
public function getMissing(): ?int
{
return $this->missing;
}
public function isEmpty(): bool
{
return empty($this->locale);
}
protected function hasMachine(): bool
{
return in_array($this->locale, Machines::LOCALES, true);
}
}
-10
View File
@@ -1,10 +0,0 @@
<?php
namespace LaravelLang\Development\Models;
use DragonCode\Support\Concerns\Makeable;
abstract class Model
{
use Makeable;
}
-60
View File
@@ -1,60 +0,0 @@
<?php
declare(strict_types=1);
namespace LaravelLang\Development\Processors;
use DragonCode\Support\Facades\Filesystem\File;
use RuntimeException;
class AddLocale extends Processor
{
protected string $target_path = 'locales';
public function __construct(
protected string $locale
) {
}
public function run(): void
{
$this->throwIfExists();
$this->createFiles();
$this->fillKeys();
}
protected function createFiles(): void
{
foreach ($this->files() as $file) {
$target_path = $this->getTargetPath($this->locale . '/' . $file);
$filename = $this->isMainJson($file) ? $this->locale . '.json' : $file;
$this->process($target_path, $filename, $this->locale);
}
}
protected function process(string $target_path, string $filename, ?string $locale = null): void
{
$this->store($target_path, [], $filename);
}
protected function throwIfExists(): void
{
$path = $this->getTargetPath($this->locale);
if (is_dir($path)) {
throw new RuntimeException("The localization with code {$this->locale} has already been created.");
}
}
protected function fillKeys()
{
$this->app->processor(Keys::make($this->locale));
}
protected function files(): array
{
return File::names($this->getSourcePath());
}
}
-97
View File
@@ -1,97 +0,0 @@
<?php
namespace LaravelLang\Development\Processors;
use DragonCode\Support\Facades\Filesystem\Directory;
use GuzzleHttp\Client;
use RuntimeException;
use ZipArchive;
class Download extends Processor
{
protected string $url = 'https://github.com/{name}/archive/refs/heads/{branch}.zip';
protected array $repositories = [
'laravel/framework' => [
'5.8',
'6.x',
'7.x',
'8.x',
'9.x',
],
'laravel/laravel' => [
'5.8',
'6.x',
'7.x',
'8.x',
'9.x',
],
];
public function __construct(
protected Client $client = new Client(),
protected ZipArchive $zip = new ZipArchive()
) {
}
public function run(): void
{
foreach ($this->repositories as $repository => $branches) {
foreach ($branches as $branch) {
$url = $this->url($repository, $branch);
$namespace_path = $this->namespacePath($repository, $branch);
$download_path = $this->downloadPath($repository, $branch);
$this->cleanup($namespace_path, $download_path);
$this->download($url, $download_path);
$this->unpack($namespace_path, $download_path);
}
}
}
protected function download(string $url, string $sink): void
{
Directory::ensureDirectory(dirname($sink));
$this->client->get($url, compact('sink'));
}
protected function unpack(string $directory, string $file): void
{
if ($this->zip->open($file)) {
$this->zip->extractTo($directory);
$this->zip->close();
} else {
throw new RuntimeException('Cannot unpack file: ' . realpath($file));
}
}
protected function url(string $repository, string $branch): string
{
return str_replace(['{name}', '{branch}'], [$repository, $branch], $this->url);
}
protected function downloadPath(string $repository, string $branch): string
{
return $this->app->vendorPath($repository . '/' . $branch . '.zip');
}
protected function namespacePath(string $repository, string $branch): string
{
return $this->vendorPath($repository . '/' . $branch);
}
protected function vendorPath(string $path): string
{
return $this->app->vendorPath($path);
}
protected function cleanup(string ...$paths): void
{
foreach ($paths as $path) {
Directory::ensureDelete($path);
}
}
}
-84
View File
@@ -1,84 +0,0 @@
<?php
namespace LaravelLang\Development\Processors;
use DragonCode\Support\Facades\Filesystem\File;
use DragonCode\Support\Facades\Helpers\Arr;
class Excludes extends Processor
{
protected string $target_path = 'excludes';
protected array $keys = [];
protected ?string $stub = 'exclude.stub';
public function run(): void
{
$this->loadKeys();
$this->handle();
}
protected function handle(): void
{
foreach ($this->targetFiles() as $filename) {
$this->process($this->getTargetPath($filename), $filename);
}
}
protected function process(string $target_path, string $filename, ?string $locale = null): void
{
$target = $this->load($target_path);
$content = $this->merge($this->keys, $target, $filename);
$this->sort($content, false);
$this->store($target_path, array_values($content), $this->stub, true);
}
protected function merge(array $source, array $target, string $filename): array
{
return array_intersect($source, $target);
}
protected function sort(array &$array, bool $key = true): void
{
$array = Arr::sort(array_unique($array));
}
protected function loadKeys(): void
{
foreach ($this->sourceFiles() as $filename) {
$keys = $this->getSourceKeys($filename);
$this->keys = array_merge($this->keys, $keys);
}
}
protected function sourceFiles(): array
{
return File::names($this->getSourcePath(), recursive: true);
}
protected function targetFiles(): array
{
return File::names($this->getTargetPath());
}
protected function getSourceKeys(string $filename): array
{
$items = $this->load($this->getSourcePath($filename));
if ($this->isJson($filename)) {
return array_values($items);
}
return $this->flatten($items);
}
protected function flatten(array $array): array
{
return Arr::flatten($array);
}
}
-98
View File
@@ -1,98 +0,0 @@
<?php
namespace LaravelLang\Development\Processors;
use DragonCode\Support\Facades\Filesystem\Directory;
class Git extends Processor
{
public function run(): void
{
foreach ($this->locales() as $locale) {
dump($locale . '...');
$this->checkout();
$this->createBranch($locale);
$this->add($locale);
$this->commit($locale);
$this->push($locale);
}
}
protected function locales(): array
{
return Directory::names($this->getLocalesPath());
}
protected function checkout(): void
{
$this->git(sprintf('checkout "%s"', $this->getSourceBranchName()));
}
protected function add(string $locale): void
{
$this->git(sprintf('add locales/%s/*', $locale));
}
protected function commit(string $locale): void
{
$message = $this->getMessage($locale);
$this->git(sprintf('commit -m "%s"', $message));
}
protected function push(string $locale): void
{
$repository = env('GIT_REPOSITORY', 'origin');
$branch = $this->getTargetBranchName($locale);
$this->git(sprintf('push --set-upstream %s %s', $repository, $branch));
}
protected function createBranch(string $locale): void
{
$source_branch = $this->getSourceBranchName();
$target_branch = $this->getTargetBranchName($locale);
$this->git(sprintf('checkout -b "%s" "%s"', $target_branch, $source_branch));
}
protected function git(string $command): void
{
$directory = $this->getGitDirectory();
exec('git -C "' . $directory . '" ' . $command);
}
protected function getLocalesPath(): string
{
return $this->app->localePath();
}
protected function getGitDirectory(): string
{
$directory = $this->app->basePath();
return realpath($directory);
}
protected function getSourceBranchName(): string
{
return env('GIT_SOURCE_BRANCH', 'main');
}
protected function getTargetBranchName(string $locale): string
{
$prefix = env('GIT_TARGET_BRANCH', 'patch');
return sprintf('%s/%s/%s', $prefix, date('Y-m-d'), $locale);
}
protected function getMessage(string $locale): string
{
$message = env('GIT_MESSAGE');
return sprintf($message, $locale);
}
}
-42
View File
@@ -1,42 +0,0 @@
<?php
namespace LaravelLang\Development\Processors;
use DragonCode\Support\Facades\Filesystem\File;
class Keys extends Processor
{
protected string $target_path = 'locales';
public function __construct(
protected ?string $locale = null
) {
}
public function run(): void
{
foreach ($this->locales() as $locale) {
foreach ($this->files($locale) as $file) {
$target_path = $this->getTargetPath($locale . '/' . $file);
$filename = $this->isMainJson($file) ? 'en.json' : $file;
$this->process($target_path, $filename, $locale);
}
}
}
protected function files(string $locale): array
{
return File::names($this->getTargetPath($locale));
}
protected function locales(): array
{
if ($this->locale) {
return [$this->locale];
}
return parent::locales();
}
}
-89
View File
@@ -1,89 +0,0 @@
<?php
namespace LaravelLang\Development\Processors;
use DragonCode\Support\Facades\Helpers\Arr;
use LaravelLang\Development\DataTransferObjects\PackageDTO;
use LaravelLang\Development\Facades\Package;
class Packages extends Processor
{
protected array $packages = [
'laravel/breeze' => 'packages/breeze.json',
'laravel/fortify' => 'packages/fortify.json',
'laravel/jetstream' => 'packages/jetstream/jetstream.json',
'laravel/ui' => 'packages/ui.json',
'laravel/framework/5.8' => 'packages/framework/laravel-5.json',
'laravel/framework/6.x' => 'packages/framework/laravel-6.json',
'laravel/framework/7.x' => 'packages/framework/laravel-7.json',
'laravel/framework/8.x' => 'packages/framework/laravel-8.json',
'laravel/framework/9.x' => 'packages/framework/laravel-9.json',
'laravel/laravel/5.8' => ['packages/framework/laravel-5.json', false],
'laravel/laravel/6.x' => ['packages/framework/laravel-6.json', false],
'laravel/laravel/7.x' => ['packages/framework/laravel-7.json', false],
'laravel/laravel/8.x' => ['packages/framework/laravel-8.json', false],
'laravel/laravel/9.x' => ['packages/framework/laravel-9.json', false],
];
public function run(): void
{
foreach ($this->packages as $package => $params) {
$dto = $this->resolveFileNames($params);
$path = $this->getSourcePath($dto->filename);
$source = $dto->replace ? [] : $this->loadTarget($path);
$items = array_merge(
$source,
$this->parse($package),
$this->rawFiles($dto->copy_files)
);
$content = $this->map($items);
$this->sort($content, false);
$this->store($path, $content);
}
}
protected function map(array $items): array
{
return Arr::values($items);
}
protected function rawFiles(array $filenames): array
{
$items = [];
foreach ($filenames as $filename) {
$path = $this->app->vendorPath($filename);
$content = $this->getFilesystem($path)->load($path);
$items = array_merge($items, $content);
}
return $items;
}
protected function parse(string $package): array
{
$path = $this->app->vendorPath($package);
return Package::some()->path($path)->content();
}
protected function resolveFileNames(array|string $params): PackageDTO
{
return PackageDTO::fromArray((array) $params);
}
protected function loadTarget(string $filename): array
{
return $this->getFilesystem($filename)->load($filename);
}
}
-196
View File
@@ -1,196 +0,0 @@
<?php
namespace LaravelLang\Development\Processors;
use DragonCode\Support\Concerns\Makeable;
use DragonCode\Support\Facades\Filesystem\Directory;
use DragonCode\Support\Facades\Filesystem\File;
use DragonCode\Support\Facades\Helpers\Arr;
use DragonCode\Support\Tools\Stub;
use JetBrains\PhpStorm\Pure;
use LaravelLang\Development\Application;
use LaravelLang\Development\Concerns\Contains;
use LaravelLang\Development\Contracts\Filesystem;
use LaravelLang\Development\Contracts\Processable;
use LaravelLang\Development\Contracts\Stringable;
use LaravelLang\Development\Services\Filesystem\Base;
use LaravelLang\Development\Services\Filesystem\Json as JsonFilesystem;
use LaravelLang\Development\Services\Filesystem\Markdown as MarkdownFilesystem;
use LaravelLang\Development\Services\Filesystem\Php as PhpFilesystem;
abstract class Processor implements Processable
{
use Contains;
use Makeable;
protected Application $app;
protected array $source = [];
protected string $target_path;
/** @var \LaravelLang\Development\Contracts\Filesystem[]|array */
protected array $filesystems = [];
public function application(Application $app): Processable
{
$this->app = $app;
return $this;
}
protected function merge(array $source, array $target, string $filename): array
{
$target = $this->filter($target, $source);
$this->sort($source);
$this->sort($target);
if ($this->isValidation($filename)) {
$custom = $this->getFallbackValue($source, $target, 'custom');
$source = Arr::except($source, ['attributes', 'custom']);
$target = Arr::except($target, ['attributes', 'custom']);
return array_merge($source, $target, compact('custom'));
}
return array_merge($source, $target);
}
protected function process(string $target_path, string $filename, ?string $locale = null): void
{
$source = $this->source($filename);
$target = $this->load($target_path);
$content = $this->merge($source, $target, $filename);
$this->store($target_path, $content, $filename);
}
protected function source(string $filename): array
{
if ($this->source[$filename] ?? false) {
return $this->source[$filename];
}
return $this->source[$filename] = $this->isJson($filename) ? $this->sourceJson() : $this->loadSource($filename);
}
protected function loadSource(string $filename): array
{
$files = File::names($this->getSourcePath(), recursive: true);
$file = Arr::of($files)
->filter(fn ($name) => str_contains($name, $filename))
->values()
->toArray();
return $this->load($this->getSourcePath($file[0]));
}
protected function sourceJson(): array
{
$path = $this->getSourcePath();
$files = File::names($path, fn ($filename) => $this->isJson($filename), true);
$array = [];
foreach ($files as $file) {
$items = $this->loadSource($file);
$array = Arr::addUnique($array, $items);
}
return Arr::renameKeys($array, static fn ($key, $value) => $value);
}
protected function getFallbackValue(array $source, array $target, string $key)
{
return Arr::get($target, $key) ?: Arr::get($source, $key, []);
}
protected function getTargetPath(?string $path = null): string
{
if ($path = $this->app->cleanPath($path)) {
$path = '/' . $path;
}
return $this->app->path($this->target_path . $path);
}
protected function getSourcePath(?string $filename = null): string
{
return $this->app->sourcePath($filename);
}
protected function filter(array $first, array $second): array
{
$keys = array_keys($second);
return Arr::only($first, $keys);
}
protected function sort(array &$array, bool $key = true): void
{
$array = $key
? Arr::ksort($array)
: Arr::sort($array);
}
protected function load(string $path): array
{
return $this->getFilesystem($path)->load($path);
}
protected function locales(): array
{
return Directory::names($this->getTargetPath());
}
#[Pure(true)]
protected function resolveFilename(string $filename, string $locale): string
{
$basename = pathinfo($filename, PATHINFO_BASENAME);
return $this->isJson($basename) ? $locale . '.json' : $basename;
}
protected function getFilesystem(string $filename): Filesystem
{
$class = $this->getFilesystemClass($filename);
if ($this->filesystems[$class] ?? false) {
return $this->filesystems[$class];
}
return $this->filesystems[$class] = $this->loadFilesystem($class);
}
protected function getFilesystemClass(string $path): string
{
return match (true) {
$this->isJson($path) => JsonFilesystem::class,
$this->isMarkdown($path) => MarkdownFilesystem::class,
default => PhpFilesystem::class,
};
}
protected function loadFilesystem(Filesystem|Base|string $filesystem): Filesystem
{
return $filesystem::make()->application($this->app);
}
protected function store(string $path, array|string|Stringable $content, ?string $source_filename = null, bool $is_simple = false): void
{
$stub = $this->getStubPath($source_filename);
$this->getFilesystem($path)->store($path, $content, $is_simple, $stub);
}
protected function getStubPath(?string $filename): ?string
{
return empty($filename) ? Stub::PHP_ARRAY : $filename;
}
}
-51
View File
@@ -1,51 +0,0 @@
<?php
namespace LaravelLang\Development\Processors;
use DragonCode\Support\Facades\Filesystem\Directory;
use LaravelLang\Development\Concerns\Template;
use LaravelLang\Development\Constants\Referents as Constants;
use LaravelLang\Development\Contracts\Stringable;
use LaravelLang\Development\Services\Compilers\Referents as Compilator;
use ReflectionClass;
use ReflectionClassConstant;
class Referents extends Processor
{
use Template;
protected string $target_path = 'locales';
public function run(): void
{
$map = $this->map();
$result = $this->compileContent($map);
$this->store('docs/referents.md', $result);
}
protected function compileContent(array $items): Stringable
{
return Compilator::make($this->app)->items($items);
}
protected function map(): array
{
$locales = array_flip($this->locales());
return array_merge($locales, $this->assignees());
}
protected function locales(): array
{
return Directory::names($this->getTargetPath());
}
protected function assignees(): array
{
$class = new ReflectionClass(Constants::class);
return $class->getConstants(ReflectionClassConstant::IS_PUBLIC);
}
}
-52
View File
@@ -1,52 +0,0 @@
<?php
namespace LaravelLang\Development\Processors\Statuses;
use DragonCode\Support\Facades\Filesystem\Directory;
use DragonCode\Support\Facades\Helpers\Str;
use LaravelLang\Development\Constants\Resource;
use LaravelLang\Development\Contracts\Stringable;
use LaravelLang\Development\Services\Compilers\Collection;
use LaravelLang\Development\Services\Compilers\Locale;
class Locales extends Processor
{
protected function saving(): void
{
foreach ($this->locales as $locale => $items) {
$count = $this->countMissing($locale);
$content = $this->compileList($locale, $items);
$result = $this->compileContent($content, $locale, $count);
$filename = Str::slug($locale);
$this->store($this->pathStatus($filename . '.md'), $result);
}
}
protected function compileContent(string $content, string $locale, int $count): Stringable
{
return Locale::make($this->app)->items(compact('locale', 'count', 'content'));
}
protected function compileList(string $locale, array $items): string
{
$content = Collection::make($this->app)
->extend(compact('locale'))
->items($items)
->toString();
return $content ?: $this->template(Resource::COMPONENT_ALL_TRANSLATED);
}
protected function ensureDirectory(): void
{
Directory::ensureDirectory($this->pathStatus(), can_delete: true);
}
protected function pathStatus(?string $filename = null): string
{
return $this->app->path('docs/statuses/' . $filename);
}
}
-23
View File
@@ -1,23 +0,0 @@
<?php
namespace LaravelLang\Development\Processors\Statuses;
use LaravelLang\Development\Contracts\Stringable;
use LaravelLang\Development\Services\Compilers\Status;
class Main extends Processor
{
protected function saving(): void
{
$result = $this->compileContent($this->locales);
$this->store('docs/status.md', $result);
}
protected function compileContent(array $items): Stringable
{
return Status::make($this->app)
->extend($this->getCounts())
->items($items);
}
}
-163
View File
@@ -1,163 +0,0 @@
<?php
namespace LaravelLang\Development\Processors\Statuses;
use DragonCode\Support\Facades\Callbacks\Sorter;
use DragonCode\Support\Facades\Filesystem\Directory;
use DragonCode\Support\Facades\Filesystem\File;
use DragonCode\Support\Facades\Helpers\Arr;
use LaravelLang\Development\Concerns\Countable;
use LaravelLang\Development\Concerns\Excludes;
use LaravelLang\Development\Concerns\Template;
use LaravelLang\Development\Processors\Processor as BaseProcessor;
abstract class Processor extends BaseProcessor
{
use Countable;
use Excludes;
use Template;
protected string $extension = '.md';
protected string $target_path = 'statuses';
protected array $source_files = [];
protected array $locales = [];
abstract protected function saving(): void;
public function run(): void
{
$this->ensureDirectory();
$this->handle();
$this->saving();
}
protected function handle(): void
{
foreach ($this->locales() as $locale) {
$this->ensureLocale($locale);
foreach ($this->files() as $file) {
$target_path = $this->getTargetPath($locale . $this->extension);
$this->process($target_path, $file, $locale);
}
}
}
protected function process(string $target_path, string $filename, ?string $locale = null): void
{
$corrected = $this->resolveFilename($filename, $locale);
$source = $this->source($filename);
$target = $this->target($locale, $corrected);
$is_validation = $this->isValidation($filename);
$this->addCount($source);
if ($diff = $this->compare($source, $target, $locale, $is_validation)) {
$this->pushLocale($locale, $corrected, $diff);
$this->addCount($diff, 'diff');
}
}
protected function compare(array $source, array $target, string $locale, bool $is_validation): array
{
$source = $this->prepareComparing($source, $is_validation);
$target = $this->prepareComparing($target, $is_validation);
return array_filter(
$target,
fn ($value, $key) => $this->hasEquals($value, $key, $source, $locale, $is_validation),
ARRAY_FILTER_USE_BOTH
);
}
protected function prepareComparing(array $array, bool $is_validation): array
{
if ($is_validation) {
$array = Arr::except($array, ['attributes', 'custom']);
}
return Arr::flattenKeys($array);
}
protected function hasEquals($value, $key, array $source, string $locale, bool $is_validation): bool
{
if ($is_validation && in_array($key, ['attributes', 'custom'], true)) {
return false;
}
if ($this->hasExclude($value, $locale)) {
return false;
}
return $value === Arr::get($source, $key);
}
protected function countMissing(string $locale): int
{
$items = array_map(static fn (array $items) => count($items), $this->locales[$locale]);
return array_sum($items);
}
protected function getLocalePath(?string $locale = null): string
{
return $this->app->localePath($locale);
}
protected function locales(): array
{
return Directory::names($this->getLocalePath());
}
protected function files(): array
{
if (! empty($this->source_files)) {
return $this->source_files;
}
$files = File::names($this->getSourcePath(), recursive: true);
$items = Arr::sort($files, function (string $a, string $b) {
$sorter = Sorter::default();
return $sorter($a, $b);
});
$php = array_filter($items, fn ($value) => ! $this->isJson($value));
$json = array_filter($items, fn ($value) => $this->isJson($value));
return $this->source_files = array_merge(array_values($php), array_values($json));
}
protected function target(string $locale, string $filename): array
{
$corrected = $this->resolveFilename($filename, $locale);
$path = $this->getLocalePath($locale . '/' . $corrected);
return $this->load($path);
}
protected function pushLocale(string $locale, string $filename, array $diff): void
{
$this->locales[$locale][$filename] = $diff;
}
protected function ensureLocale(string $locale): void
{
if (! isset($this->locales[$locale])) {
$this->locales[$locale] = [];
}
}
protected function ensureDirectory(): void
{
}
}
@@ -1,99 +0,0 @@
<?php
namespace LaravelLang\Development\Processors\Statuses;
use LaravelLang\Development\Facades\Translate;
use Throwable;
class Translator extends Processor
{
protected function saving(): void
{
foreach ($this->locales as $locale => $items) {
foreach ($items as $filename => $values) {
dump(sprintf('[%s] %s...', $locale, $filename));
$filename = $this->restoreFilename($locale, $filename);
$this->translateKeys($locale, $filename, $values);
}
}
}
protected function translateKeys(string $locale, string $filename, array $items): void
{
try {
foreach ($items as &$item) {
$item = $this->translate($locale, $item);
}
} catch (Throwable $e) {
dump($e->getMessage());
} finally {
$this->storing($locale, $filename, $items);
}
}
protected function storing(string $locale, string $filename, array $items): void
{
$target_path = $this->getLocalePath($locale) . '/' . $filename;
$source = $this->source($filename);
$target = $this->target($locale, $filename);
$target = array_merge($target, $items);
$content = $this->merge($source, $target, $filename);
$this->store($target_path, $content, $filename);
}
protected function translate(string $locale, string $text): string
{
$map = [];
$transformed = $this->transformText($text, $map);
$translated = Translate::translate($locale, $transformed);
return $this->restoreText($translated, $map);
}
protected function transformText(string $text, array &$map): string
{
preg_match_all('/:[a-z]+/', $text, $matches);
foreach ($matches as $match) {
foreach ($match as $key) {
$map[$key] = $this->getRandomValue($map);
}
}
return $this->transformReplace($text, $map);
}
protected function restoreText(string $text, array $map): string
{
return $this->transformReplace($text, array_flip($map));
}
protected function transformReplace(string $text, array $items): string
{
return str_replace(array_keys($items), array_values($items), $text);
}
protected function getRandomValue(array $items): int
{
$random = random_int(1000, 9999);
return in_array($random, $items, true) ? $this->getRandomValue($items) : $random;
}
protected function restoreFilename(string $locale, string $filename): string
{
return match (true) {
$this->isMainJson($filename) => $locale . '.json',
$this->isJson($filename) => $filename . '.json',
default => $filename . '.php',
};
}
}
@@ -1,51 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Compilers;
use LaravelLang\Development\Constants\Resource;
class Collection extends Compiler
{
public function toString(): string
{
$result = '';
foreach ($this->items as $filename => $values) {
$is_json = $this->isJson($filename);
$content = $this->compileItems($values, $is_json);
$count = count($values);
$result .= $this->compileLocale($content, $count, $filename);
}
return $result;
}
protected function compileLocale(string $content, int $count, string $filename): string
{
$basename = $this->basename($filename);
return $this->template(Resource::COMPONENT_LOCALE, compact('count', 'basename', 'filename', 'content'));
}
protected function compileItems(array $items, bool $is_json = false): string
{
$rows = $this->split($items, $is_json);
return Table::make($this->app)->items($rows)->toString();
}
protected function split(array $items, bool $is_json = false): array
{
return $is_json
? array_values(array_map(static fn ($key) => [$key], array_keys($items)))
: array_values(array_map(static fn ($key, $value) => [$key, $value], array_keys($items), array_values($items)));
}
protected function basename(string $filename): string
{
return pathinfo($filename, PATHINFO_FILENAME);
}
}
-39
View File
@@ -1,39 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Compilers;
use DragonCode\Support\Concerns\Makeable;
use LaravelLang\Development\Concerns\Contains;
use LaravelLang\Development\Concerns\Template;
use LaravelLang\Development\Contracts\Application;
use LaravelLang\Development\Contracts\Stringable;
abstract class Compiler implements Stringable
{
use Contains;
use Makeable;
use Template;
protected array $items;
protected array $extend = [];
public function __construct(
protected Application $app
) {
}
public function items(array $items): self
{
$this->items = $items;
return $this;
}
public function extend(array $values): self
{
$this->extend = $values;
return $this;
}
}
-13
View File
@@ -1,13 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Compilers;
use LaravelLang\Development\Constants\Resource;
class Locale extends Compiler
{
public function toString(): string
{
return $this->template(Resource::LOCALE, $this->items);
}
}
-51
View File
@@ -1,51 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Compilers;
use LaravelLang\Development\Constants\Resource;
class Referents extends Compiler
{
public function toString(): string
{
$content = $this->compileContent();
return $this->template(Resource::REFERENTS, compact('content'));
}
protected function compileContent(): string
{
$rows = [];
foreach ($this->items as $key => $value) {
$rows[] = $this->mapRow($key, $value);
}
return Table::make($this->app)->items($rows)->toString();
}
protected function mapRow(string $key, int|array $values): array
{
$row = [$key, ''];
if (is_array($values)) {
$row[1] = $this->mapAssignees($values);
}
return $row;
}
protected function mapAssignees(array $values): string
{
$result = [];
foreach ($values as $value) {
$result[] = $this->template(Resource::COMPONENT_LINK, [
'title' => '@' . $value,
'link' => 'https://github.com/' . $value,
]);
}
return implode(', ', $result);
}
}
-91
View File
@@ -1,91 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Compilers;
use DragonCode\Support\Facades\Helpers\Str;
use LaravelLang\Development\Constants\Resource;
use LaravelLang\Development\Models\Locale;
class Status extends Compiler
{
protected int $columns = 6;
public function toString(): string
{
return $this->template(Resource::STATUS, $this->getContent());
}
protected function grouped(): array
{
$locales = [];
foreach ($this->items as $locale => $values) {
$missing = count($values);
$locales[] = Locale::make($locale, $missing);
}
return $this->group($locales);
}
protected function group(array $items): array
{
return array_map(function (array $items) {
if ($this->columns > count($items)) {
$need = $this->columns - count($items);
$filled = array_fill(0, $need, Locale::make());
return array_merge($items, $filled);
}
return $items;
}, array_chunk($items, $this->columns));
}
protected function compileContent(): string
{
$rows = [];
foreach ($this->grouped() as $items) {
$rows[] = $this->mapRow($items);
}
return Table::make($this->app)
->items($rows)
->align('center')
->columns($this->columns)
->toString();
}
/**
* @param \LaravelLang\Development\Models\Locale[]|array $items
*
* @return array
*/
protected function mapRow(array $items): array
{
$row = [];
foreach ($items as $item) {
$row[] = $this->template(Resource::COMPONENT_LINK, [
'title' => $item->getTitle(),
'link' => $this->link($item->getLocale()),
], return_empty: $item->isEmpty());
}
return $row;
}
protected function getContent(): array
{
$content = $this->compileContent();
return array_merge(compact('content'), $this->extend);
}
protected function link(?string $value): string
{
return empty($value) ? '' : sprintf('statuses/%s.md', Str::slug($value));
}
}
-101
View File
@@ -1,101 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Compilers;
use LaravelLang\Development\Constants\Resource;
class Table extends Compiler
{
protected string $align = 'left';
protected int $columns = 1;
public function align(string $align): self
{
$this->align = $align;
return $this;
}
public function columns(int $columns): self
{
$this->columns = $columns;
return $this;
}
public function toString(): string
{
$width = $this->getWidth($this->getTableWidth());
$content = $this->compileRows();
return $this->template(Resource::COMPONENT_TABLE, compact('width', 'content'));
}
protected function compileRows(): string
{
$result = '';
foreach ($this->items as $row) {
$columns = '';
foreach ($row as $value) {
$columns .= $this->compileColumn($value);
}
$result .= $this->compileRow($columns);
}
return $result;
}
protected function compileRow(string $row): string
{
return $this->template(Resource::COMPONENT_TABLE_ROW, compact('row'));
}
protected function compileColumn(string $column): string
{
$align = $this->getAlign();
$width = $this->getWidth($this->getColumnWidth());
return $this->template(Resource::COMPONENT_TABLE_COLUMN, compact('align', 'width', 'column'));
}
protected function getAlign(): string
{
$align = $this->align;
return $this->template(Resource::COMPONENT_TABLE_ATTRIBUTE_ALIGN, compact('align'), true);
}
protected function getWidth(?int $width): ?string
{
if (! $width) {
return null;
}
return $this->template(Resource::COMPONENT_TABLE_ATTRIBUTE_WIDTH, compact('width'), true);
}
protected function getTableWidth(): ?int
{
return $this->hasColumns() ? 100 : null;
}
protected function getColumnWidth(): ?int
{
return $this->hasColumns() ? round(100 / $this->getColumns()) : null;
}
protected function hasColumns(): bool
{
return $this->getColumns() > 1;
}
protected function getColumns(): int
{
return abs($this->columns);
}
}
-26
View File
@@ -1,26 +0,0 @@
<?php
namespace LaravelLang\Development\Services;
use DragonCode\Support\Concerns\Makeable;
class Counter
{
use Makeable;
protected int $count = 0;
public function count(array $items): int
{
$this->calculate($items);
return $this->count;
}
protected function calculate(array $items): void
{
foreach ($items as $item) {
is_array($item) ? $this->calculate($item) : $this->count++;
}
}
}
-39
View File
@@ -1,39 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Filesystem;
use DragonCode\Support\Concerns\Makeable;
use DragonCode\Support\Facades\Helpers\Arr;
use LaravelLang\Development\Application;
use LaravelLang\Development\Concerns\Storable;
use LaravelLang\Development\Contracts\Filesystem;
abstract class Base implements Filesystem
{
use Makeable;
use Storable;
protected Application $app;
public function application(Application $app): Filesystem
{
$this->app = $app;
return $this;
}
public function load(string $path): array
{
return [];
}
protected function correctValues(array $items): array
{
$callback = static fn ($value) => stripslashes($value);
return Arr::of($items)
->map($callback, true)
->renameKeys($callback)
->toArray();
}
}
-26
View File
@@ -1,26 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Filesystem;
use DragonCode\Support\Facades\Filesystem\File;
use DragonCode\Support\Tools\Stub;
use LaravelLang\Development\Contracts\Stringable;
class Json extends Base
{
public function load(string $path): array
{
$items = File::load($path);
return $this->correctValues($items);
}
public function store(string $path, array|string|Stringable $content, bool $is_simple = false, string $stub = Stub::PHP_ARRAY): void
{
if ($is_simple) {
$content = array_values($content);
}
file_put_contents($path, json_encode($content, JSON_UNESCAPED_UNICODE ^ JSON_UNESCAPED_SLASHES ^ JSON_PRETTY_PRINT));
}
}
-17
View File
@@ -1,17 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Filesystem;
use DragonCode\Support\Facades\Filesystem\File;
use DragonCode\Support\Tools\Stub;
use LaravelLang\Development\Contracts\Stringable;
class Markdown extends Base
{
public function store(string $path, array|string|Stringable $content, bool $is_simple = false, string $stub = Stub::PHP_ARRAY): void
{
$content = $this->prepareToStore($content);
File::store($path, $content);
}
}
-29
View File
@@ -1,29 +0,0 @@
<?php
namespace LaravelLang\Development\Services\Filesystem;
use DragonCode\PrettyArray\Services\File as Pretty;
use DragonCode\PrettyArray\Services\Formatter;
use DragonCode\Support\Tools\Stub;
use LaravelLang\Development\Contracts\Stringable;
class Php extends Base
{
public function load(string $path): array
{
$items = Pretty::make()->load($path);
return $this->correctValues($items);
}
public function store(string $path, array|string|Stringable $content, bool $is_simple = false, string $stub = Stub::PHP_ARRAY): void
{
$service = Formatter::make();
$is_simple
? $service->setSimple()
: $service->setEqualsAlign();
Pretty::make($service->raw($content))->store($path, $this->getStub($stub));
}
}
-67
View File
@@ -1,67 +0,0 @@
<?php
namespace LaravelLang\Development\Services;
use DragonCode\Support\Facades\Helpers\Str;
use GuzzleHttp\Client;
use GuzzleHttp\RequestOptions;
class Translate
{
protected string $url = 'https://translate.api.cloud.yandex.net/translate/v2/translate';
public function translate(string $locale, string $text): string
{
$content = $this->request($locale, $text);
return $content['translations'][0]['text'];
}
protected function request(string $locale, string $text): array
{
$response = $this->client()->request('POST', $this->url, [
RequestOptions::HEADERS => $this->headers(),
RequestOptions::JSON => $this->body($locale, $text),
]);
return json_decode($response->getBody()->getContents(), true);
}
protected function headers(): array
{
return [
'Authorization' => 'Bearer ' . $this->apiKey(),
];
}
protected function body(string $locale, string $text): array
{
return [
'targetLanguageCode' => $this->correctLocale($locale),
'texts' => [$text],
'folderId' => $this->folderId(),
];
}
protected function correctLocale(string $locale): string
{
return Str::before($locale, '_');
}
protected function client(): Client
{
return new Client();
}
protected function apiKey(): string
{
return env('YANDEX_API_KEY');
}
protected function folderId(): string
{
return env('YANDEX_API_FOLDER_ID');
}
}
-31
View File
@@ -1,31 +0,0 @@
<?php
namespace LaravelLang\Development\Support;
use Dotenv\Repository\AdapterRepository;
use Dotenv\Repository\RepositoryBuilder;
use Dotenv\Repository\RepositoryInterface;
use PhpOption\Option;
class Env
{
protected static RepositoryInterface|AdapterRepository|null $repository;
public function get(string $key, mixed $default = null): mixed
{
$value = $this->getRepository()->get($key);
return Option::fromValue($value)->getOrElse($default);
}
public function getRepository(): AdapterRepository|RepositoryInterface
{
if (self::$repository ?? false) {
return self::$repository;
}
$builder = RepositoryBuilder::createWithDefaultAdapters();
return self::$repository = $builder->immutable()->make();
}
}
-58
View File
@@ -1,58 +0,0 @@
<?php
namespace LaravelLang\Development\Support;
use DragonCode\Support\Concerns\Makeable;
use Symfony\Component\Finder\Finder as SymfonyFinder;
class Finder
{
use Makeable;
protected array $names = ['*.php', '*.json', '*.js', '*.vue', '*.stub'];
protected array $contains = ['__(', 'trans(', '@lang(', 'Lang::get('];
protected array $files = [];
public function __construct(
protected SymfonyFinder $finder
) {
}
public function get(string|array $path): array
{
$this->search($path);
return $this->files($path);
}
protected function search(string|array $path): void
{
foreach ($this->find($path) as $file) {
$this->push($path, $file->getRealPath());
}
}
protected function find(string|array $path): SymfonyFinder
{
return $this->finder()->in($path)->files()
->name($this->names)
->contains($this->contains);
}
protected function push(string|array $source, string $path): void
{
$this->files[$source][] = $path;
}
protected function files(string|array $path): array
{
return $this->files[$path] ?? [];
}
protected function finder(): SymfonyFinder
{
return clone $this->finder;
}
}
-57
View File
@@ -1,57 +0,0 @@
<?php
namespace LaravelLang\Development\Support;
use DragonCode\Support\Facades\Filesystem\Directory;
use DragonCode\Support\Facades\Helpers\Str;
class Package
{
protected ?string $path;
protected array $filter = ['$', 'self::', 'static::', 'auth.', 'pagination.', 'passwords.', 'validation.'];
public function __construct(
protected Finder $finder,
protected Parser $parser
) {
}
public function some(): self
{
return $this;
}
public function path(string $path): self
{
Directory::validate($path);
$this->path = $path;
return $this;
}
public function content(): array
{
$files = $this->files();
$items = $this->parsed($files);
return $this->filter($items);
}
protected function files(): array
{
return $this->finder->get($this->path);
}
protected function parsed(array $files): array
{
return $this->parser->files($files)->get();
}
protected function filter(array $items): array
{
return array_filter(array_keys($items), fn ($value) => ! Str::contains($value, $this->filter));
}
}
-109
View File
@@ -1,109 +0,0 @@
<?php
namespace LaravelLang\Development\Support;
use DragonCode\Support\Concerns\Makeable;
use DragonCode\Support\Facades\Helpers\Arr;
use DragonCode\Support\Facades\Helpers\Str;
class Parser
{
use Makeable;
protected const REGEX = '/\b(__|trans|lang|Lang\:\:get)\(\r*\s*(.+)\r*\s*(\)|,\s?\[)/U';
protected array $files = [];
protected array $keys = [];
public function files(array $files): self
{
$this->files = $files;
return $this;
}
public function get(): array
{
$this->clear();
$this->each();
$this->sort();
return $this->keys();
}
protected function clear(): void
{
$this->keys = [];
}
protected function each(): void
{
foreach ($this->files as $file) {
$content = file_get_contents($file);
$this->parse($content);
}
}
protected function sort(): void
{
Arr::ksort($this->keys);
}
protected function parse(string $content): void
{
foreach ($this->match($content) as $match) {
$value = $match;
if (Str::contains((string) $value, ['__', 'trans', '@lang', 'Lang::get'])) {
$sub_key = $this->subkey($value);
$sub_value = $this->keys[$sub_key] ?? null;
$this->push($sub_value);
}
$this->push($value);
}
}
protected function match(string $content, string $pattern = self::REGEX): array
{
preg_match_all($pattern, $content, $matches);
return $matches[2] ?? [];
}
protected function push(mixed $value): void
{
$value = $this->trim($value);
if (! isset($this->keys[$value])) {
$this->keys[$value] = $value;
}
}
protected function subkey(string $value): string
{
$sub_key = $this->match($value)[0];
return $this->trim($sub_key);
}
protected function keys(): array
{
return $this->keys;
}
protected function trim($value)
{
if (is_string($value)) {
$chars = " \t\n\r\0\x0B'\"";
return trim(stripslashes($value), $chars);
}
return $value;
}
}
-18
View File
@@ -1,18 +0,0 @@
<?php
use LaravelLang\Development\Facades\Env;
if (! function_exists('env')) {
/**
* Determine if the given value is "blank".
*
* @param string $key
* @param mixed|null $default
*
* @return bool
*/
function env(string $key, mixed $default = null): mixed
{
return Env::get($key, $default);
}
}
-10
View File
@@ -1,10 +0,0 @@
<?php
use LaravelLang\Development\Processors\Packages;
require __DIR__ . '/bootstrap/autoload.php';
/** @var \LaravelLang\Development\Application $app */
$app = require_once __DIR__ . '/bootstrap/app.php';
$app->processor(Packages::make());
-10
View File
@@ -1,10 +0,0 @@
<?php
use LaravelLang\Development\Processors\Git;
require __DIR__ . '/bootstrap/autoload.php';
/** @var \LaravelLang\Development\Application $app */
$app = require_once __DIR__ . '/bootstrap/app.php';
$app->processor(Git::make());
-10
View File
@@ -1,10 +0,0 @@
<?php
use LaravelLang\Development\Processors\Referents;
require __DIR__ . '/bootstrap/autoload.php';
/** @var \LaravelLang\Development\Application $app */
$app = require_once __DIR__ . '/bootstrap/app.php';
$app->processor(Referents::make());
-14
View File
@@ -1,14 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
return {{slot}};
-15
View File
@@ -1,15 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Exclusion list
|--------------------------------------------------------------------------
|
| This is a list of exclusions for words or phrases where the original
| form of the word has the same spelling in a given language.
|
| This list contains values.
|
*/
return {{slot}};
-14
View File
@@ -1,14 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
return {{slot}};
-14
View File
@@ -1,14 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
return {{slot}};
@@ -1,14 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
return {{slot}};
@@ -1,14 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Nova Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
return {{slot}};
-14
View File
@@ -1,14 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Nova Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
return {{slot}};
-14
View File
@@ -1,14 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
return {{slot}};
-2
View File
@@ -1,2 +0,0 @@
[{{title}}]({{link}})
-6
View File
@@ -1,6 +0,0 @@
### [{{basename}}](https://github.com/Laravel-Lang/lang/blob/main/locales/{{locale}}/{{filename}})
##### Missing: {{count}}
{{content}}
@@ -1 +0,0 @@
align="{{align}}"
@@ -1 +0,0 @@
width="{{width}}%"
@@ -1,3 +0,0 @@
<td {{align}} {{width}}>
{{column}}
</td>
@@ -1,3 +0,0 @@
<table {{width}}>
{{content}}
</table>
-1
View File
@@ -1 +0,0 @@
<tr>{{row}}</tr>
-1
View File
@@ -1 +0,0 @@
All lines are translated 😎
Loaded 100 of 1187 files, more files were not shown because too many files have changed in this diff. Show more